diff options
author | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2008-05-27 10:34:15 +0000 |
---|---|---|
committer | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2008-05-27 10:34:15 +0000 |
commit | bf95ccb5068543b453c1dfbf5e8ae7b6c814e1e4 (patch) | |
tree | e1ce92224d77dd59b5d6227c2c800c19d90ae605 /cpukit/libcsupport | |
parent | Bugfix: Moved definition of ppp_softc into source file. (diff) | |
download | rtems-bf95ccb5068543b453c1dfbf5e8ae7b6c814e1e4.tar.bz2 |
Added const qualifier to various pointers and data tables to
reduce size of data area.
IMFS: Fixed creation of symbolic links to avoid a compiler warning.
DOSFS: Use LibBlock instead of read() to read the boot record.
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio.h | 42 | ||||
-rw-r--r-- | cpukit/libcsupport/src/base_fs.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/error.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/libio.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/mount.c | 10 |
5 files changed, 31 insertions, 31 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index 2a3fcaed49..baa2219352 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -345,16 +345,16 @@ typedef enum */ struct rtems_libio_tt { - rtems_driver_name_t *driver; - off_t size; /* size of file */ - off_t offset; /* current offset into file */ - uint32_t flags; - rtems_filesystem_location_info_t pathinfo; - rtems_id sem; - uint32_t data0; /* private to "driver" */ - void *data1; /* ... */ - void *file_info; /* used by file handlers */ - rtems_filesystem_file_handlers_r *handlers; /* type specific handlers */ + rtems_driver_name_t *driver; + off_t size; /* size of file */ + off_t offset; /* current offset into file */ + uint32_t flags; + rtems_filesystem_location_info_t pathinfo; + rtems_id sem; + uint32_t data0; /* private to "driver" */ + void *data1; /* ... */ + void *file_info; /* used by file handlers */ + const rtems_filesystem_file_handlers_r *handlers; /* type specific handlers */ }; /* @@ -612,11 +612,11 @@ int unmount( ); int mount( - rtems_filesystem_mount_table_entry_t **mt_entry, - rtems_filesystem_operations_table *fs_ops, - rtems_filesystem_options_t fsoptions, - char *device, - char *mount_point + rtems_filesystem_mount_table_entry_t **mt_entry, + const rtems_filesystem_operations_table *fs_ops, + rtems_filesystem_options_t fsoptions, + const char *device, + const char *mount_point ); /* @@ -624,14 +624,14 @@ int mount( */ typedef struct { - rtems_filesystem_operations_table *fs_ops; - rtems_filesystem_options_t fsoptions; - char *device; - char *mount_point; + const rtems_filesystem_operations_table *fs_ops; + rtems_filesystem_options_t fsoptions; + const char *device; + const char *mount_point; } rtems_filesystem_mount_table_t; -extern rtems_filesystem_mount_table_t *rtems_filesystem_mount_table; -extern int rtems_filesystem_mount_table_size; +extern const rtems_filesystem_mount_table_t *rtems_filesystem_mount_table; +extern const int rtems_filesystem_mount_table_size; #ifdef __cplusplus } diff --git a/cpukit/libcsupport/src/base_fs.c b/cpukit/libcsupport/src/base_fs.c index e5ddb24494..4ce53b0e4b 100644 --- a/cpukit/libcsupport/src/base_fs.c +++ b/cpukit/libcsupport/src/base_fs.c @@ -45,8 +45,8 @@ void rtems_filesystem_initialize( void ) #if !defined(RTEMS_UNIX) int status; rtems_filesystem_mount_table_entry_t *entry; - rtems_filesystem_mount_table_t *mt; - rtems_filesystem_location_info_t loc; + const rtems_filesystem_mount_table_t *mt; + rtems_filesystem_location_info_t loc; /* * Set the default umask to "022". diff --git a/cpukit/libcsupport/src/error.c b/cpukit/libcsupport/src/error.c index c94be59ad5..15f8e8d23e 100644 --- a/cpukit/libcsupport/src/error.c +++ b/cpukit/libcsupport/src/error.c @@ -63,7 +63,7 @@ char *strerror(int); int rtems_panic_in_progress; -rtems_assoc_t rtems_status_assoc[] = { +const rtems_assoc_t rtems_status_assoc[] = { { "successful completion", RTEMS_SUCCESSFUL, }, { "returned from a thread", RTEMS_TASK_EXITTED, }, { "multiprocessing not configured", RTEMS_MP_NOT_CONFIGURED, }, diff --git a/cpukit/libcsupport/src/libio.c b/cpukit/libcsupport/src/libio.c index 879cd8134c..16bd7f1ec8 100644 --- a/cpukit/libcsupport/src/libio.c +++ b/cpukit/libcsupport/src/libio.c @@ -62,14 +62,14 @@ extern rtems_libio_t *rtems_libio_iop_freelist; * Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand */ -rtems_assoc_t access_modes_assoc[] = { +const rtems_assoc_t access_modes_assoc[] = { { "READ", LIBIO_FLAGS_READ, O_RDONLY }, { "WRITE", LIBIO_FLAGS_WRITE, O_WRONLY }, { "READ/WRITE", LIBIO_FLAGS_READ_WRITE, O_RDWR }, { 0, 0, 0 }, }; -rtems_assoc_t status_flags_assoc[] = { +const rtems_assoc_t status_flags_assoc[] = { #ifdef ACCEPT_O_NDELAY_ALIAS { "NO DELAY", LIBIO_FLAGS_NO_DELAY, O_NDELAY }, #endif diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c index 7b99dfae7d..997cf859b1 100644 --- a/cpukit/libcsupport/src/mount.c +++ b/cpukit/libcsupport/src/mount.c @@ -68,11 +68,11 @@ static int Is_node_fs_root( */ int mount( - rtems_filesystem_mount_table_entry_t **mt_entry, - rtems_filesystem_operations_table *fs_ops, - rtems_filesystem_options_t options, - char *device, - char *mount_point + rtems_filesystem_mount_table_entry_t **mt_entry, + const rtems_filesystem_operations_table *fs_ops, + rtems_filesystem_options_t options, + const char *device, + const char *mount_point ) { rtems_filesystem_location_info_t loc; |