From 5eb27ce4095c85451964db5f83d10df12ab037db Mon Sep 17 00:00:00 2001 From: Nick Withers Date: Fri, 20 Feb 2015 15:00:47 +1100 Subject: Don't fail to create passwd and group files if /etc already exists --- cpukit/libcsupport/src/pwdgrp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cpukit/libcsupport/src/pwdgrp.c b/cpukit/libcsupport/src/pwdgrp.c index a5526a094d..b184ea8e96 100644 --- a/cpukit/libcsupport/src/pwdgrp.c +++ b/cpukit/libcsupport/src/pwdgrp.c @@ -61,11 +61,10 @@ static void init_file(const char *name, const char *content) */ static void pwdgrp_init(void) { - int rc; - - rc = mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); - if ( rc != 0 ) - return; + /* + * Do the best to create this directory. + */ + mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); /* * Initialize /etc/passwd -- cgit v1.2.3