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/libfs/src/imfs/imfs_creat.c | |
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/libfs/src/imfs/imfs_creat.c')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_creat.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_creat.c b/cpukit/libfs/src/imfs/imfs_creat.c index 94d9dac9c1..1eaea0b384 100644 --- a/cpukit/libfs/src/imfs/imfs_creat.c +++ b/cpukit/libfs/src/imfs/imfs_creat.c @@ -24,18 +24,17 @@ #include <rtems/libio_.h> IMFS_jnode_t *IMFS_create_node( - rtems_filesystem_location_info_t *parent_loc, - IMFS_jnode_types_t type, - char *name, - mode_t mode, - IMFS_types_union *info + rtems_filesystem_location_info_t *parent_loc, + IMFS_jnode_types_t type, + const char *name, + mode_t mode, + const IMFS_types_union *info ) { IMFS_jnode_t *node; struct timeval tv; IMFS_jnode_t *parent = NULL; IMFS_fs_info_t *fs_info; - char *sym_name; if ( parent_loc != NULL ) parent = parent_loc->node_access; @@ -94,9 +93,7 @@ IMFS_jnode_t *IMFS_create_node( break; case IMFS_SYM_LINK: - sym_name = calloc( 1, strlen( info->sym_link.name ) + 1 ); - strcpy( sym_name, info->sym_link.name ); - node->info.sym_link.name = sym_name; + node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: |