aboutsummaryrefslogtreecommitdiff
path: root/libnetfs/make-peropen.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnetfs/make-peropen.c')
-rw-r--r--libnetfs/make-peropen.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libnetfs/make-peropen.c b/libnetfs/make-peropen.c
index 92f58da0..733bfdcb 100644
--- a/libnetfs/make-peropen.c
+++ b/libnetfs/make-peropen.c
@@ -31,6 +31,7 @@ netfs_make_peropen (struct node *np, int flags, struct peropen *context)
po->refcnt = 0;
po->openstat = flags;
po->np = np;
+ po->path = NULL;
if (context)
{
@@ -47,6 +48,13 @@ netfs_make_peropen (struct node *np, int flags, struct peropen *context)
if (po->shadow_root_parent != MACH_PORT_NULL)
mach_port_mod_refs (mach_task_self (), po->shadow_root_parent,
MACH_PORT_RIGHT_SEND, 1);
+
+ if (context->path)
+ {
+ po->path = strdup (context->path);
+ if (! po->path)
+ return ENOMEM;
+ }
}
netfs_nref (np);