diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-09-02 22:22:17 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-09-02 22:22:17 +0000 |
commit | 192c35f6eb2bb85e28c697a45c7d80a43ec6e743 (patch) | |
tree | cca9dfaedbd20844b78eccf5e30b9d0f95b5975a | |
parent | 7eb79fff10915afc4d561a65e54851efa869db89 (diff) | |
download | busybox-w32-192c35f6eb2bb85e28c697a45c7d80a43ec6e743.tar.gz busybox-w32-192c35f6eb2bb85e28c697a45c7d80a43ec6e743.tar.bz2 busybox-w32-192c35f6eb2bb85e28c697a45c7d80a43ec6e743.zip |
Tito writes:
The second patch contains:
1) a size optimization for adduser.c
2) removes a warning about an unused variable in syslogd.c if CONFIG_FEATURE_REMOTE_LOG is not set
3)cosmetic fixes for addgroup_full_usage and adduser_full_usage
Ciao,
Tito
-rw-r--r-- | include/usage.h | 4 | ||||
-rw-r--r-- | loginutils/adduser.c | 9 | ||||
-rw-r--r-- | sysklogd/syslogd.c | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/include/usage.h b/include/usage.h index a0b812a4a..f87f367c4 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -4,14 +4,14 @@ | |||
4 | #define addgroup_trivial_usage \ | 4 | #define addgroup_trivial_usage \ |
5 | "[-g GID] group_name [user_name]" | 5 | "[-g GID] group_name [user_name]" |
6 | #define addgroup_full_usage \ | 6 | #define addgroup_full_usage \ |
7 | "Adds a group to the system" \ | 7 | "Adds a group to the system\n\n" \ |
8 | "Options:\n" \ | 8 | "Options:\n" \ |
9 | "\t-g GID\t\tspecify gid" | 9 | "\t-g GID\t\tspecify gid" |
10 | 10 | ||
11 | #define adduser_trivial_usage \ | 11 | #define adduser_trivial_usage \ |
12 | "[OPTIONS] user_name" | 12 | "[OPTIONS] user_name" |
13 | #define adduser_full_usage \ | 13 | #define adduser_full_usage \ |
14 | "Adds a user to the system" \ | 14 | "Adds a user to the system\n\n" \ |
15 | "Options:\n" \ | 15 | "Options:\n" \ |
16 | "\t-h DIR\t\tAssign home directory DIR\n" \ | 16 | "\t-h DIR\t\tAssign home directory DIR\n" \ |
17 | "\t-g GECOS\tAssign gecos field GECOS\n" \ | 17 | "\t-g GECOS\tAssign gecos field GECOS\n" \ |
diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 768788845..7fa05a013 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c | |||
@@ -305,13 +305,8 @@ int adduser_main(int argc, char **argv) | |||
305 | 305 | ||
306 | if (usegroup) { | 306 | if (usegroup) { |
307 | /* Add user to a group that already exists */ | 307 | /* Add user to a group that already exists */ |
308 | struct group *g; | 308 | pw.pw_gid = my_getgrnam(usegroup); |
309 | 309 | /* exits on error */ | |
310 | g = getgrnam(usegroup); | ||
311 | if (g == NULL) | ||
312 | bb_error_msg_and_die("group %s does not exist", usegroup); | ||
313 | |||
314 | pw.pw_gid = g->gr_gid; | ||
315 | } | 310 | } |
316 | 311 | ||
317 | /* grand finale */ | 312 | /* grand finale */ |
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 741c80673..6e7652c00 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -386,7 +386,9 @@ static void logMessage(int pri, char *msg) | |||
386 | time_t now; | 386 | time_t now; |
387 | char *timestamp; | 387 | char *timestamp; |
388 | static char res[20] = ""; | 388 | static char res[20] = ""; |
389 | #ifdef CONFIG_FEATURE_REMOTE_LOG | ||
389 | static char line[512]; | 390 | static char line[512]; |
391 | #endif | ||
390 | CODE *c_pri, *c_fac; | 392 | CODE *c_pri, *c_fac; |
391 | 393 | ||
392 | if (pri != 0) { | 394 | if (pri != 0) { |