summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/pwdgrp.c
diff options
context:
space:
mode:
authorRyan Long <ryan.long@oarcorp.com>2021-03-23 12:25:15 -0400
committerJoel Sherrill <joel@rtems.org>2021-03-23 11:43:13 -0500
commit37fc6516d36e82e0a740b33cc2787b4d031411d9 (patch)
tree4a60b73d8166ee3f75bf193791394112dd985860 /cpukit/libcsupport/src/pwdgrp.c
parentbsps/riscv: Add per cpu clock interrupt (diff)
downloadrtems-37fc6516d36e82e0a740b33cc2787b4d031411d9.tar.bz2
pwdgrp.c: Remove _Assert. /etc may already exist
Removed the _Assert_unused_variable_equals macro due to /etc having already been created by the network stack initialization or an initial filesystem image. Closes #4282
Diffstat (limited to '')
-rw-r--r--cpukit/libcsupport/src/pwdgrp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/libcsupport/src/pwdgrp.c b/cpukit/libcsupport/src/pwdgrp.c
index f4a10f7f46..154a92a11a 100644
--- a/cpukit/libcsupport/src/pwdgrp.c
+++ b/cpukit/libcsupport/src/pwdgrp.c
@@ -67,9 +67,13 @@ static void pwdgrp_init(void)
/*
* Do the best to create this directory.
+ *
+ * /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_Unused_variable_equals(sc, 0);
+ _Assert((sc == 0) || (sc == -1 && errno == EEXIST));
+ (void) sc;
/*
* Initialize /etc/passwd