symlink: nfs41_create() can create symlinks
added optional symlink argument to nfs41_create(), used when type is NF4LNK changed createttype4.u.lnk.linkdata from char[] to const char* and updated encoding in nfs41_xdr.c Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
08c2618551
commit
8c4c98b669
4 changed files with 10 additions and 4 deletions
|
|
@ -411,6 +411,7 @@ int nfs41_create(
|
|||
IN nfs41_session *session,
|
||||
IN uint32_t type,
|
||||
IN uint32_t mode,
|
||||
IN OPTIONAL const char *symlink,
|
||||
IN nfs41_path_fh *parent,
|
||||
OUT nfs41_path_fh *file)
|
||||
{
|
||||
|
|
@ -450,6 +451,10 @@ int nfs41_create(
|
|||
|
||||
compound_add_op(&compound, OP_CREATE, &create_args, &create_res);
|
||||
create_args.objtype.type = type;
|
||||
if (type == NF4LNK) {
|
||||
create_args.objtype.u.lnk.linkdata = symlink;
|
||||
create_args.objtype.u.lnk.linkdata_len = (uint32_t)strlen(symlink);
|
||||
}
|
||||
create_args.name = &file->name;
|
||||
create_args.createattrs.info.attrmask.count = 2;
|
||||
create_args.createattrs.info.attrmask.arr[0] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue