summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/lchown.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-09-11 10:59:06 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-09-12 15:31:23 +0200
commitd2da61aa0cf73dadc31eb3fd4202c04faf0e7653 (patch)
tree65156db0a2ec463e6a7f2752e3e7c8463f2bc35b /cpukit/libcsupport/src/lchown.c
parentFilesystem: Add and use rtems_filesystem_chmod() (diff)
downloadrtems-d2da61aa0cf73dadc31eb3fd4202c04faf0e7653.tar.bz2
Filesystem: Change rtems_filesystem_chown()
Implement POSIX requirements in the high-level file system layer. Use common implementation for all change owner variants.
Diffstat (limited to 'cpukit/libcsupport/src/lchown.c')
-rw-r--r--cpukit/libcsupport/src/lchown.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/cpukit/libcsupport/src/lchown.c b/cpukit/libcsupport/src/lchown.c
index 406ac59045..d6d20d6a9d 100644
--- a/cpukit/libcsupport/src/lchown.c
+++ b/cpukit/libcsupport/src/lchown.c
@@ -19,10 +19,15 @@
int lchown( const char *path, uid_t owner, gid_t group )
{
- return rtems_filesystem_chown(
- path,
- owner,
- group,
- RTEMS_FS_FOLLOW_HARD_LINK
- );
+ int rv;
+ rtems_filesystem_eval_path_context_t ctx;
+ int eval_flags = RTEMS_FS_FOLLOW_HARD_LINK;
+ const rtems_filesystem_location_info_t *currentloc =
+ rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
+
+ rv = rtems_filesystem_chown( currentloc, owner, group );
+
+ rtems_filesystem_eval_path_cleanup( &ctx );
+
+ return rv;
}