From 98b785e66c762f0aa4b9001b26e7956bdccfb54a Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 1 Jul 2010 17:22:03 +0000 Subject: 2010-07-01 Vinu Rajashekhar PR 1597/cpukit * libcsupport/Makefile.am, libcsupport/src/chown.c: Add lchown() and utimes(). * libcsupport/src/lchown.c, libcsupport/src/utimes.c: New files. --- cpukit/libcsupport/src/chown.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'cpukit/libcsupport/src/chown.c') diff --git a/cpukit/libcsupport/src/chown.c b/cpukit/libcsupport/src/chown.c index 157c59e997..3cab985cad 100644 --- a/cpukit/libcsupport/src/chown.c +++ b/cpukit/libcsupport/src/chown.c @@ -24,16 +24,17 @@ #include #include -int chown( +int _chown_helper( const char *path, uid_t owner, - gid_t group + gid_t group, + int follow_link ) { rtems_filesystem_location_info_t loc; int result; - if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) + if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, follow_link ) ) return -1; result = (*loc.ops->chown_h)( &loc, owner, group ); @@ -42,3 +43,12 @@ int chown( return result; } + +int chown( + const char *path, + uid_t owner, + gid_t group +) +{ + return _chown_helper( path, owner, group, true ); +} -- cgit v1.2.3