summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-05-29 04:09:21 +0000
committerNeil Brown <neilb@suse.de>2006-05-29 04:09:21 +0000
commitc97be4db86a710faef7b21829c2aa59f228212b2 (patch)
tree40c4a3e12bd79e8299ef557bcf7589f2b6b757ce /config.c
parent0c239ef733aa16d9716942de204b73d5f80fe557 (diff)
downloadmdadm-c97be4db86a710faef7b21829c2aa59f228212b2.tar.gz
Improve compiling for static binaries.
Have "#ifdef STATIC" in config.c, and the 'rmconf' target was a mess. Instead, create 'pwgr.c' with stub routines for those unavailable when statically compiled, and include that in STATICOBJ Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/config.c b/config.c
index d753f54..5accf15 100644
--- a/config.c
+++ b/config.c
@@ -320,14 +320,12 @@ static void createline(char *line)
}
createinfo.uid = strtoul(w+6, &ep, 10);
if (*ep != 0) {
-#ifndef STATIC
struct passwd *pw;
/* must be a name */
pw = getpwnam(w+6);
if (pw)
createinfo.uid = pw->pw_uid;
else
-#endif /* STATIC */
fprintf(stderr, Name ": CREATE user %s not found\n", w+6);
}
} else if (strncasecmp(w, "group=", 6) == 0) {
@@ -337,14 +335,12 @@ static void createline(char *line)
}
createinfo.gid = strtoul(w+6, &ep, 10);
if (*ep != 0) {
-#ifndef STATIC
struct group *gr;
/* must be a name */
gr = getgrnam(w+6);
if (gr)
createinfo.gid = gr->gr_gid;
else
-#endif /* STATIC */
fprintf(stderr, Name ": CREATE group %s not found\n", w+6);
}
} else if (strncasecmp(w, "mode=", 5) == 0) {