From d71fcabaa6bc42e82d83060da49abff2b41ee272 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 12 Oct 1999 18:44:40 +0000 Subject: Added call to freenod to let each filesystem free its own internal node used to manage file access. --- cpukit/libcsupport/src/chown.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'cpukit/libcsupport/src/chown.c') diff --git a/cpukit/libcsupport/src/chown.c b/cpukit/libcsupport/src/chown.c index 189096dcd1..cc579b40a5 100644 --- a/cpukit/libcsupport/src/chown.c +++ b/cpukit/libcsupport/src/chown.c @@ -26,13 +26,22 @@ int chown( gid_t group ) { - rtems_filesystem_location_info_t temp_loc; + rtems_filesystem_location_info_t loc; + int result; - if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) ) + if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, TRUE ) ) return -1; - if ( !temp_loc.ops->chown ) + if ( !loc.ops->chown ) { + if ( loc.ops->freenod ) + (*loc.ops->freenod)( &loc ); set_errno_and_return_minus_one( ENOTSUP ); + } - return (*temp_loc.ops->chown)( &temp_loc, owner, group ); + result = (*loc.ops->chown)( &loc, owner, group ); + + if ( loc.ops->freenod ) + (*loc.ops->freenod)( &loc ); + + return result; } -- cgit v1.2.3