summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/libfs/src/imfs/imfs_mknod.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_mknod.c b/cpukit/libfs/src/imfs/imfs_mknod.c
index 0344ad5684..d269d614af 100644
--- a/cpukit/libfs/src/imfs/imfs_mknod.c
+++ b/cpukit/libfs/src/imfs/imfs_mknod.c
@@ -32,8 +32,6 @@ static void get_type_and_info_by_mode_and_dev(
{
if ( S_ISDIR( mode ) ) {
*type = IMFS_DIRECTORY;
- } else if ( S_ISREG( mode ) ) {
- *type = IMFS_MEMORY_FILE;
} else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) {
*type = IMFS_DEVICE;
rtems_filesystem_split_dev_t(
@@ -44,7 +42,8 @@ static void get_type_and_info_by_mode_and_dev(
} else if (S_ISFIFO( mode )) {
*type = IMFS_FIFO;
} else {
- IMFS_assert( 0 );
+ IMFS_assert( S_ISREG( mode ) );
+ *type = IMFS_MEMORY_FILE;
}
}