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 /c/src/lib/libc/utime.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 'c/src/lib/libc/utime.c')
-rw-r--r-- | c/src/lib/libc/utime.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/c/src/lib/libc/utime.c b/c/src/lib/libc/utime.c index f1a12ee1b2..ccc92d044e 100644 --- a/c/src/lib/libc/utime.c +++ b/c/src/lib/libc/utime.c @@ -24,12 +24,18 @@ int utime( ) { rtems_filesystem_location_info_t temp_loc; + int result; + + if ( !temp_loc.ops->utime ) + set_errno_and_return_minus_one( ENOTSUP ); if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) ) return -1; - if ( !temp_loc.ops->utime ) - set_errno_and_return_minus_one( ENOTSUP ); + result = (*temp_loc.ops->utime)( &temp_loc, times->actime, times->modtime ); + + if ( temp_loc.ops->freenod ) + (*temp_loc.ops->freenod)( &temp_loc ); - return (*temp_loc.ops->utime)( &temp_loc, times->actime, times->modtime ); + return result; } |