diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-05-15 10:27:46 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-05-15 10:37:00 +0200 |
commit | 0a95800a58036ad75aa2b972036d458906ac447c (patch) | |
tree | 84330a05745639c08d0c039b7b12a0a4cf105c9c /cpukit/libcsupport | |
parent | Filesystem: Move operations to mount table entry (diff) | |
download | rtems-0a95800a58036ad75aa2b972036d458906ac447c.tar.bz2 |
Filesystem: Change pathconf_limits_and_options
The pathconf_limits_and_options field of
rtems_filesystem_mount_table_entry_t is now a const pointer to reduce
the read-write memory demands of file system instances.
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio.h | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/fpathconf.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/mount.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index 0e74c4c7fe..b59ec0fb54 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -1439,7 +1439,7 @@ struct rtems_filesystem_mount_table_entry_tt { rtems_filesystem_global_location_t *mt_fs_root; bool mounted; bool writeable; - rtems_filesystem_limits_and_options_t pathconf_limits_and_options; + const rtems_filesystem_limits_and_options_t *pathconf_limits_and_options; /* * The target or mount point of the file system. diff --git a/cpukit/libcsupport/src/fpathconf.c b/cpukit/libcsupport/src/fpathconf.c index b0e0dc7a75..a48c5d35fc 100644 --- a/cpukit/libcsupport/src/fpathconf.c +++ b/cpukit/libcsupport/src/fpathconf.c @@ -26,7 +26,7 @@ long fpathconf( { long return_value; rtems_libio_t *iop; - rtems_filesystem_limits_and_options_t *the_limits; + const rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); @@ -36,7 +36,7 @@ long fpathconf( * Now process the information request. */ - the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; + the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c index 4563bdbf24..84283bc8e6 100644 --- a/cpukit/libcsupport/src/mount.c +++ b/cpukit/libcsupport/src/mount.c @@ -83,7 +83,7 @@ static rtems_filesystem_mount_table_entry_t *alloc_mount_table_entry( mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; - mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; + mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; |