diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-12 18:44:40 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-12 18:44:40 +0000 |
commit | d71fcabaa6bc42e82d83060da49abff2b41ee272 (patch) | |
tree | 0fe667b13aa15cbab7baaed510a894fa1cb9dd78 /cpukit/libcsupport/src/stat.c | |
parent | Changed bcopy to strncpy to stick to ANSI/ISO routines. (diff) | |
download | rtems-d71fcabaa6bc42e82d83060da49abff2b41ee272.tar.bz2 |
Added call to freenod to let each filesystem free its own internal
node used to manage file access.
Diffstat (limited to 'cpukit/libcsupport/src/stat.c')
-rw-r--r-- | cpukit/libcsupport/src/stat.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/stat.c b/cpukit/libcsupport/src/stat.c index db28d0eedc..ff1d0db618 100644 --- a/cpukit/libcsupport/src/stat.c +++ b/cpukit/libcsupport/src/stat.c @@ -58,8 +58,11 @@ int _STAT_NAME( if ( status != 0 ) return -1; - if ( !loc.handlers->fstat ) + if ( !loc.handlers->fstat ){ + if ( loc.ops->freenod ) + (*loc.ops->freenod)( &loc ); set_errno_and_return_minus_one( ENOTSUP ); + } /* * Zero out the stat structure so the various support @@ -68,7 +71,12 @@ int _STAT_NAME( memset( buf, 0, sizeof(struct stat) ); - return (*loc.handlers->fstat)( &loc, buf ); + status = (*loc.handlers->fstat)( &loc, buf ); + + if ( loc.ops->freenod ) + (*loc.ops->freenod)( &loc ); + + return status; } #endif |