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/mknod.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 '')
-rw-r--r-- | cpukit/libcsupport/src/mknod.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/mknod.c b/cpukit/libcsupport/src/mknod.c index 97f6cb0884..48444f8549 100644 --- a/cpukit/libcsupport/src/mknod.c +++ b/cpukit/libcsupport/src/mknod.c @@ -52,8 +52,15 @@ int mknod( if ( result != 0 ) return -1; - if ( !temp_loc.ops->mknod ) + if ( !temp_loc.ops->mknod ) { + if ( temp_loc.ops->freenod ) + (*temp_loc.ops->freenod)( &temp_loc ); set_errno_and_return_minus_one( ENOTSUP ); + } - return (*temp_loc.ops->mknod)( name_start, mode, dev, &temp_loc ); + result = (*temp_loc.ops->mknod)( name_start, mode, dev, &temp_loc ); + if ( temp_loc.ops->freenod ) + (*temp_loc.ops->freenod)( &temp_loc ); + + return result; } |