diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-08-02 18:27:23 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-08-02 18:27:23 +0000 |
commit | 8851c0a5ef60f8ed98ceda73f9430e023e823a57 (patch) | |
tree | d8f23141fcd65d8072be7febdd12ab9bd9cd4cfc /cpukit/libfs/src/imfs/imfs_mknod.c | |
parent | 2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-8851c0a5ef60f8ed98ceda73f9430e023e823a57.tar.bz2 |
2010-08-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_eval.c,
libfs/src/imfs/imfs_mknod.c, libfs/src/imfs/imfs_readlink.c,
libfs/src/pipe/fifo.c: Clean up for coverage improvements and
formatting.
Diffstat (limited to 'cpukit/libfs/src/imfs/imfs_mknod.c')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_mknod.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_mknod.c b/cpukit/libfs/src/imfs/imfs_mknod.c index 28ca79e201..1a0175af0a 100644 --- a/cpukit/libfs/src/imfs/imfs_mknod.c +++ b/cpukit/libfs/src/imfs/imfs_mknod.c @@ -53,12 +53,10 @@ int IMFS_mknod( else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); - } - else if (S_ISFIFO(mode)) + } else if (S_ISFIFO(mode)) type = IMFS_FIFO; - else { - rtems_set_errno_and_return_minus_one( EINVAL ); - } + else + IMFS_assert( 0 ); /* * Allocate and fill in an IMFS jnode @@ -70,14 +68,7 @@ int IMFS_mknod( * existed. The result was simpler code which should not have * this path. */ - new_node = IMFS_create_node( - pathloc, - type, - new_name, - mode, - &info - ); - + new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); |