diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-06-08 15:15:31 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-06-08 15:15:31 +0000 |
commit | 68cd765a22860c9c5822bc06183cb416102e3db4 (patch) | |
tree | 9306a59121c138156ba1b8b513584b0392b37fe9 /cpukit | |
parent | 2010-06-08 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff) | |
download | rtems-68cd765a22860c9c5822bc06183cb416102e3db4.tar.bz2 |
2010-06-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libfs/src/imfs/imfs_creat.c: Reject creation of FIFOs if support is
disabled.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_creat.c | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 5f5dfd6031..c177c59b6c 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,10 @@ 2010-06-08 Sebastian Huber <sebastian.huber@embedded-brains.de> + * libfs/src/imfs/imfs_creat.c: Reject creation of FIFOs if support is + disabled. + +2010-06-08 Sebastian Huber <sebastian.huber@embedded-brains.de> + PR 1524/filesystem * libcsupport/src/rtems_mkdir.c: New file. * libcsupport/src/Makefile.am: Reflect change above. diff --git a/cpukit/libfs/src/imfs/imfs_creat.c b/cpukit/libfs/src/imfs/imfs_creat.c index 9313d6c6f5..f1253ea327 100644 --- a/cpukit/libfs/src/imfs/imfs_creat.c +++ b/cpukit/libfs/src/imfs/imfs_creat.c @@ -45,6 +45,16 @@ IMFS_jnode_t *IMFS_create_node( if ( parent_loc == NULL ) return NULL; + parent = parent_loc->node_access; + fs_info = parent_loc->mt_entry->fs_info; + + /* + * Reject creation of FIFOs if support is disabled. + */ + if ( type == IMFS_FIFO && + fs_info->fifo_handlers == &rtems_filesystem_null_handlers ) + return NULL; + /* * Allocate filesystem node and fill in basic information */ @@ -96,8 +106,6 @@ IMFS_jnode_t *IMFS_create_node( /* * This node MUST have a parent, so put it in that directory list. */ - parent = parent_loc->node_access; - fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; |