diff options
Diffstat (limited to 'libtrivfs/file-reparent.c')
-rw-r--r-- | libtrivfs/file-reparent.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libtrivfs/file-reparent.c b/libtrivfs/file-reparent.c index 321c474a..0682a912 100644 --- a/libtrivfs/file-reparent.c +++ b/libtrivfs/file-reparent.c @@ -1,6 +1,6 @@ /* Reparent a directory - Copyright (C) 1997,2002 Free Software Foundation, Inc. + Copyright (C) 1997,2002,2010 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -26,5 +26,9 @@ trivfs_S_file_reparent (struct trivfs_protid *cred, mach_port_t parent, mach_port_t *new, mach_msg_type_name_t *new_type) { - return EOPNOTSUPP; + /* This is not a directory, so we just duplicate it */ + error_t ret = trivfs_S_io_duplicate (cred, reply, reply_type, new, new_type); + if (!ret) + mach_port_deallocate (mach_task_self (), parent); + return ret; } |