summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/base_fs.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-05-24 21:43:08 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-05-24 21:43:08 +0000
commite565720aadd79ad42f8bac7a5d9aab1a7ad2e5a7 (patch)
tree788463960ee09cb66c50aa1159b91042773341bf /cpukit/libcsupport/src/base_fs.c
parent2000-05-24 Fernando Ruiz Casas <fernando.ruiz@ctv.es> (diff)
downloadrtems-e565720aadd79ad42f8bac7a5d9aab1a7ad2e5a7.tar.bz2
2000-05-24 Fernando Ruiz Casas <fernando.ruiz@ctv.es>
* libc/ttyname.c (ttyname_r): Removed duplicate call to closedir(). * libc/getpwent.c: Create a more robust /etc/passwd and /etc/group. * libc/base_fs.c: Change permissions of files and directories. Now uses octal constants.
Diffstat (limited to 'cpukit/libcsupport/src/base_fs.c')
-rw-r--r--cpukit/libcsupport/src/base_fs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/base_fs.c b/cpukit/libcsupport/src/base_fs.c
index 4132d52b6d..7470b52295 100644
--- a/cpukit/libcsupport/src/base_fs.c
+++ b/cpukit/libcsupport/src/base_fs.c
@@ -54,7 +54,8 @@ void rtems_filesystem_initialize( void )
* Set the default umask to "022".
*/
- rtems_filesystem_umask = S_IWOTH | S_IROTH;
+ rtems_filesystem_umask = 022;
+
init_fs_mount_table();
@@ -77,6 +78,7 @@ void rtems_filesystem_initialize( void )
rtems_filesystem_root = entry->mt_fs_root;
rtems_filesystem_current = rtems_filesystem_root;
+
/*
* Traditionally RTEMS devices are under "/dev" so install this directory.
*
@@ -84,8 +86,11 @@ void rtems_filesystem_initialize( void )
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
+ status=chmod("/", 0755);
+ if ( status != 0 )
+ rtems_fatal_error_occurred( 0xABCD0003 );
- status = mkdir( "/dev", S_IRWXU | S_IRWXG | S_IRWXO );
+ status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );