cosmetic changes to lookup.c
removed unused variable 'buffer_size' in lookup_rpc() renamed map_lookup_error()'s parameter 'is_last_component' to 'last_component' to avoid conflicting with function is_last_component() Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
7ccdf2ba47
commit
f2095915aa
1 changed files with 3 additions and 4 deletions
|
|
@ -125,7 +125,7 @@ static int lookup_rpc(
|
||||||
OUT nfs41_lookup_component_res *res)
|
OUT nfs41_lookup_component_res *res)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
uint32_t i, buffer_size;
|
uint32_t i;
|
||||||
nfs41_compound compound;
|
nfs41_compound compound;
|
||||||
nfs_argop4 argops[4+MAX_LOOKUP_COMPONENTS*3];
|
nfs_argop4 argops[4+MAX_LOOKUP_COMPONENTS*3];
|
||||||
nfs_resop4 resops[4+MAX_LOOKUP_COMPONENTS*3];
|
nfs_resop4 resops[4+MAX_LOOKUP_COMPONENTS*3];
|
||||||
|
|
@ -159,7 +159,6 @@ static int lookup_rpc(
|
||||||
&args->getattr[i], &res->getattr[i]);
|
&args->getattr[i], &res->getattr[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer_size = MAX_RPC_RES_SIZE(component_count);
|
|
||||||
status = compound_encode_send_decode(session, &compound, TRUE);
|
status = compound_encode_send_decode(session, &compound, TRUE);
|
||||||
if (status)
|
if (status)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
@ -169,11 +168,11 @@ out:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int map_lookup_error(int status, bool_t is_last_component)
|
static int map_lookup_error(int status, bool_t last_component)
|
||||||
{
|
{
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case NFS4ERR_NOENT:
|
case NFS4ERR_NOENT:
|
||||||
if (is_last_component) return ERROR_FILE_NOT_FOUND;
|
if (last_component) return ERROR_FILE_NOT_FOUND;
|
||||||
else return ERROR_PATH_NOT_FOUND;
|
else return ERROR_PATH_NOT_FOUND;
|
||||||
case NFS4ERR_SYMLINK: return ERROR_REPARSE;
|
case NFS4ERR_SYMLINK: return ERROR_REPARSE;
|
||||||
case NFS4ERR_MOVED: return ERROR_FILESYSTEM_ABSENT;
|
case NFS4ERR_MOVED: return ERROR_FILESYSTEM_ABSENT;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue