diff options
Diffstat (limited to 'cpukit/libcsupport/src/chown.c')
-rw-r--r-- | cpukit/libcsupport/src/chown.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/cpukit/libcsupport/src/chown.c b/cpukit/libcsupport/src/chown.c index 434fc2b1a2..08ad8a26cc 100644 --- a/cpukit/libcsupport/src/chown.c +++ b/cpukit/libcsupport/src/chown.c @@ -25,31 +25,20 @@ #include <rtems/libio_.h> -int rtems_filesystem_chown( - const char *path, - uid_t owner, - gid_t group, - int eval_follow_link -) +/** + * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File + */ +int chown( const char *path, uid_t owner, gid_t group ) { - int rv = 0; + int rv; rtems_filesystem_eval_path_context_t ctx; - int eval_flags = eval_follow_link; + int eval_flags = RTEMS_FS_FOLLOW_LINK; const rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); - const rtems_filesystem_operations_table *ops = currentloc->mt_entry->ops; - rv = (*ops->chown_h)( currentloc, owner, group ); + rv = rtems_filesystem_chown( currentloc, owner, group ); rtems_filesystem_eval_path_cleanup( &ctx ); return rv; } - -/** - * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File - */ -int chown( const char *path, uid_t owner, gid_t group ) -{ - return rtems_filesystem_chown( path, owner, group, RTEMS_FS_FOLLOW_LINK ); -} |