upcall: added upcall_cleanup() to interface
added call to upcall_cleanup() after both upcall_marshall() and upcall_cancel() individual upcall operations define their nfs41_upcall_op structs locally, instead of putting tons of function prototypes in upcall.c made the upcall_marshall() function optional; most marshall functions are noops Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
7e7f73766d
commit
ae4c67c21e
12 changed files with 189 additions and 166 deletions
|
|
@ -43,7 +43,7 @@ typedef union _FILE_DIR_INFO_UNION {
|
|||
|
||||
|
||||
/* NFS41_DIR_QUERY */
|
||||
int parse_readdir(unsigned char *buffer, uint32_t length, nfs41_upcall *upcall)
|
||||
static int parse_readdir(unsigned char *buffer, uint32_t length, nfs41_upcall *upcall)
|
||||
{
|
||||
int status;
|
||||
readdir_upcall_args *args = &upcall->args.readdir;
|
||||
|
|
@ -372,7 +372,7 @@ out:
|
|||
#define COOKIE_DOT ((uint64_t)-2)
|
||||
#define COOKIE_DOTDOT ((uint64_t)-1)
|
||||
|
||||
int readdir_add_dots(
|
||||
static int readdir_add_dots(
|
||||
IN readdir_upcall_args *args,
|
||||
IN OUT unsigned char *entry_buf,
|
||||
IN uint32_t entry_buf_len,
|
||||
|
|
@ -453,7 +453,7 @@ out:
|
|||
return status;
|
||||
}
|
||||
|
||||
int handle_readdir(nfs41_upcall *upcall)
|
||||
static int handle_readdir(nfs41_upcall *upcall)
|
||||
{
|
||||
int status;
|
||||
readdir_upcall_args *args = &upcall->args.readdir;
|
||||
|
|
@ -649,7 +649,7 @@ out_free_cookie:
|
|||
goto out_free_entry;
|
||||
}
|
||||
|
||||
int marshall_readdir(unsigned char *buffer, uint32_t *length, nfs41_upcall *upcall)
|
||||
static int marshall_readdir(unsigned char *buffer, uint32_t *length, nfs41_upcall *upcall)
|
||||
{
|
||||
int status;
|
||||
readdir_upcall_args *args = &upcall->args.readdir;
|
||||
|
|
@ -661,3 +661,10 @@ out:
|
|||
free(args->buf);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
const nfs41_upcall_op nfs41_op_readdir = {
|
||||
parse_readdir,
|
||||
handle_readdir,
|
||||
marshall_readdir
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue