From d4d2f6487ac4db85746ee208c6f7a23105ed5444 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 27 Mar 2021 09:55:49 -0500 Subject: 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. --- cpukit/libcsupport/src/pwdgrp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cpukit/libcsupport/src/pwdgrp.c') 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 -- cgit v1.2.3