summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2021-03-27 09:55:49 -0500
committerJoel Sherrill <joel@rtems.org>2021-03-27 09:59:12 -0500
commitd4d2f6487ac4db85746ee208c6f7a23105ed5444 (patch)
tree2c790a3d8706cdfc500eeeb308e767bd71266de1
parentdosfs: Use peek support (diff)
downloadrtems-d4d2f6487ac4db85746ee208c6f7a23105ed5444.tar.bz2
pwdgrp.c: Change to simply ignore return value from mkdir(/etc)
At this point in time, /etc can be created in multiple ways. There is a discussion (#4354) that would define a mechanism for instantiating a base file system with some flexibility for the set of directories included. For now, this particular mkdir() call can fail because /etc could already have been created by at least an initial filesystem image, the shell, or libbsd. closes #4382.
-rw-r--r--cpukit/libcsupport/src/pwdgrp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/cpukit/libcsupport/src/pwdgrp.c b/cpukit/libcsupport/src/pwdgrp.c
index 154a92a11a..aac31f4988 100644
--- a/cpukit/libcsupport/src/pwdgrp.c
+++ b/cpukit/libcsupport/src/pwdgrp.c
@@ -71,9 +71,7 @@ static void pwdgrp_init(void)
* /etc could be created by the network stack initialization or an initial
* filesystem image. Deliberately ignore the return value.
*/
- sc = mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
- _Assert((sc == 0) || (sc == -1 && errno == EEXIST));
- (void) sc;
+ (void) mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
/*
* Initialize /etc/passwd