summaryrefslogtreecommitdiff
path: root/libdiskfs/file-get-trans.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs/file-get-trans.c')
-rw-r--r--libdiskfs/file-get-trans.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libdiskfs/file-get-trans.c b/libdiskfs/file-get-trans.c
index 11ed439e..db5bbdad 100644
--- a/libdiskfs/file-get-trans.c
+++ b/libdiskfs/file-get-trans.c
@@ -28,7 +28,7 @@ diskfs_S_file_get_translator (struct protid *cred,
size_t *translen)
{
struct node *np;
- error_t error = 0;
+ error_t err = 0;
if (!cred)
return EOPNOTSUPP;
@@ -48,16 +48,16 @@ diskfs_S_file_get_translator (struct protid *cred,
bcopy (_HURD_SYMLINK, *trans, sizeof _HURD_SYMLINK);
if (diskfs_read_symlink_hook)
- error = (*diskfs_read_symlink_hook) (np,
+ err = (*diskfs_read_symlink_hook) (np,
*trans + sizeof _HURD_SYMLINK);
- if (!diskfs_read_symlink_hook || error == EINVAL)
+ if (!diskfs_read_symlink_hook || err == EINVAL)
{
- error = diskfs_node_rdwr (np, *trans + sizeof _HURD_SYMLINK,
+ err = diskfs_node_rdwr (np, *trans + sizeof _HURD_SYMLINK,
0, np->dn_stat.st_size, 0, cred, &amt);
- if (!error)
+ if (!err)
assert (amt == np->dn_stat.st_size);
}
- if (!error)
+ if (!err)
{
(*trans)[sizeof _HURD_SYMLINK + np->dn_stat.st_size] = '\0';
*translen = len;
@@ -88,7 +88,7 @@ diskfs_S_file_get_translator (struct protid *cred,
bcopy (buf, *trans, buflen);
free (buf);
*translen = buflen;
- error = 0;
+ err = 0;
}
else if (S_ISFIFO (np->dn_stat.st_mode))
{
@@ -99,7 +99,7 @@ diskfs_S_file_get_translator (struct protid *cred,
*trans = mmap (0, len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
bcopy (_HURD_FIFO, *trans, sizeof _HURD_FIFO);
*translen = len;
- error = 0;
+ err = 0;
}
else if (S_ISSOCK (np->dn_stat.st_mode))
{
@@ -110,18 +110,18 @@ diskfs_S_file_get_translator (struct protid *cred,
*trans = mmap (0, len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
bcopy (_HURD_IFSOCK, *trans, sizeof _HURD_IFSOCK);
*translen = len;
- error = 0;
+ err = 0;
}
else
{
if (! (np->dn_stat.st_mode & S_IPTRANS))
- error = EINVAL;
+ err = EINVAL;
else
{
char *string;
u_int len;
- error = diskfs_get_translator (np, &string, &len);
- if (!error)
+ err = diskfs_get_translator (np, &string, &len);
+ if (!err)
{
if (len > *translen)
*trans = mmap (0, len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
@@ -134,5 +134,5 @@ diskfs_S_file_get_translator (struct protid *cred,
pthread_mutex_unlock (&np->lock);
- return error;
+ return err;
}