open and create accept pointer to attributes
allow callers of nfs41_open() and nfs41_create() to pass arbitrary attributes fo r use with open_args.openhow.how.createattrs and create_args.createattrs
This commit is contained in:
parent
dc9377ce58
commit
6bb641e547
9 changed files with 56 additions and 49 deletions
|
|
@ -227,7 +227,8 @@ static int handle_symlink(nfs41_upcall *upcall)
|
|||
int status = NO_ERROR;
|
||||
|
||||
if (args->set) {
|
||||
nfs41_file_info info;
|
||||
nfs41_file_info info, createattrs;
|
||||
|
||||
/* don't send windows slashes to the server */
|
||||
char *p;
|
||||
for (p = args->target_set; *p; p++) if (*p == '\\') *p = '/';
|
||||
|
|
@ -249,7 +250,11 @@ static int handle_symlink(nfs41_upcall *upcall)
|
|||
}
|
||||
|
||||
/* create the symlink */
|
||||
status = nfs41_create(state->session, NF4LNK, 0777,
|
||||
createattrs.attrmask.count = 1;
|
||||
createattrs.attrmask.arr[0] = 0;
|
||||
createattrs.attrmask.arr[1] = FATTR4_WORD1_MODE;
|
||||
createattrs.mode = 0777;
|
||||
status = nfs41_create(state->session, NF4LNK, &createattrs,
|
||||
args->target_set, &state->parent, &state->file, &info);
|
||||
if (status) {
|
||||
eprintf("nfs41_create() for symlink=%s failed with %s\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue