diff options
Diffstat (limited to 'cpukit/libcsupport/src/lchown.c')
-rw-r--r-- | cpukit/libcsupport/src/lchown.c | 17 |
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; } |