diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-02-08 19:43:09 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-02-12 20:53:36 +0100 |
commit | a9df9169882c564af6714bbf121c278092d3c51c (patch) | |
tree | 91a6f1b33100eacb6b700289612dbff956ca87df /testsuites/fstests/fsimfsgeneric01/init.c | |
parent | IMFS: Allow static initialization of FS info (diff) | |
download | rtems-a9df9169882c564af6714bbf121c278092d3c51c.tar.bz2 |
IMFS: Add fine grained configuration
Remove miniIMFS. Statically initialize the root IMFS.
Add configuration options to disable individual
features of the root IMFS, e.g.
o CONFIGURE_IMFS_DISABLE_CHOWN,
o CONFIGURE_IMFS_DISABLE_FCHMOD,
o CONFIGURE_IMFS_DISABLE_LINK,
o CONFIGURE_IMFS_DISABLE_MKNOD,
o CONFIGURE_IMFS_DISABLE_MOUNT,
o CONFIGURE_IMFS_DISABLE_READLINK,
o CONFIGURE_IMFS_DISABLE_RENAME,
o CONFIGURE_IMFS_DISABLE_RMNOD,
o CONFIGURE_IMFS_DISABLE_SYMLINK,
o CONFIGURE_IMFS_DISABLE_UNMOUNT, and
o CONFIGURE_IMFS_DISABLE_UTIME.
Diffstat (limited to 'testsuites/fstests/fsimfsgeneric01/init.c')
-rw-r--r-- | testsuites/fstests/fsimfsgeneric01/init.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/testsuites/fstests/fsimfsgeneric01/init.c b/testsuites/fstests/fsimfsgeneric01/init.c index 44d75c5fad..6cc6c15436 100644 --- a/testsuites/fstests/fsimfsgeneric01/init.c +++ b/testsuites/fstests/fsimfsgeneric01/init.c @@ -396,6 +396,13 @@ static const IMFS_node_control node_initialization_error_control = { .node_destroy = node_destroy_inhibited }; +static const rtems_filesystem_operations_table *imfs_ops; + +static int other_clone(rtems_filesystem_location_info_t *loc) +{ + return (*imfs_ops->clonenod_h)(loc); +} + static void test_imfs_make_generic_node_errors(void) { int rv = 0; @@ -403,7 +410,7 @@ static void test_imfs_make_generic_node_errors(void) rtems_chain_control *chain = &rtems_filesystem_mount_table; rtems_filesystem_mount_table_entry_t *mt_entry = (rtems_filesystem_mount_table_entry_t *) rtems_chain_first(chain); - const char *type = mt_entry->type; + rtems_filesystem_operations_table other_ops; void *opaque = NULL; rtems_resource_snapshot before; @@ -421,14 +428,17 @@ static void test_imfs_make_generic_node_errors(void) rtems_test_assert(rtems_resource_snapshot_check(&before)); errno = 0; - mt_entry->type = "XXX"; + imfs_ops = mt_entry->ops; + other_ops = *imfs_ops; + other_ops.clonenod_h = other_clone; + mt_entry->ops = &other_ops; rv = IMFS_make_generic_node( path, S_IFCHR | S_IRWXU | S_IRWXG | S_IRWXO, &node_control, NULL ); - mt_entry->type = type; + mt_entry->ops = imfs_ops; rtems_test_assert(rv == -1); rtems_test_assert(errno == ENOTSUP); rtems_test_assert(rtems_resource_snapshot_check(&before)); |