diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-01-19 19:31:00 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-01-19 19:31:00 +0000 |
commit | cb4e99201e1702a62af73debe342ea289f0d8362 (patch) | |
tree | 59ce92a3f4280b556c1456896b77a3ea3e57dbab /cpukit/libfs/src/imfs/imfs_mknod.c | |
parent | Update of libblock API, update of tqm8xx BSP (diff) | |
download | rtems-cb4e99201e1702a62af73debe342ea289f0d8362.tar.bz2 |
2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_creat.c,
libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/imfs_link.c,
libfs/src/imfs/imfs_load_tar.c, libfs/src/imfs/imfs_mknod.c,
libfs/src/imfs/imfs_symlink.c: Create special helper method for
creating the j-node for the root directory. This lets us assume that
every j-node created otherwise has a parent node.
Diffstat (limited to 'cpukit/libfs/src/imfs/imfs_mknod.c')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_mknod.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_mknod.c b/cpukit/libfs/src/imfs/imfs_mknod.c index fe852b6b0f..28ca79e201 100644 --- a/cpukit/libfs/src/imfs/imfs_mknod.c +++ b/cpukit/libfs/src/imfs/imfs_mknod.c @@ -46,7 +46,6 @@ int IMFS_mknod( /* * Figure out what type of IMFS node this is. */ - if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) @@ -64,9 +63,12 @@ int IMFS_mknod( /* * Allocate and fill in an IMFS jnode * - * NOTE: Coverity thinks this is a resource leak since a node - * is created but never deleted. The scope of the allocation - * is that of a file -- not this method. Coverity Id 21. + * NOTE: Coverity Id 21 reports this as a leak. + * While technically not a leak, it indicated that IMFS_create_node + * was ONLY passed a NULL when we created the root node. We + * added a new IMFS_create_root_node() so this path no longer + * existed. The result was simpler code which should not have + * this path. */ new_node = IMFS_create_node( pathloc, |