[BusyBox-cvs] CVS update of busybox (include/usage.h loginutils/adduser.c sysklogd/syslogd.c)
Erik Andersen
andersen at codepoet.org
Thu Sep 2 22:22:18 UTC 2004
Date: Thursday, September 2, 2004 @ 16:22:18
Author: andersen
Path: /var/cvs/busybox
Modified: include/usage.h (1.220 -> 1.221) loginutils/adduser.c (1.10 ->
1.11) sysklogd/syslogd.c (1.114 -> 1.115)
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
Index: busybox/include/usage.h
diff -u busybox/include/usage.h:1.220 busybox/include/usage.h:1.221
--- busybox/include/usage.h:1.220 Thu Aug 19 12:25:02 2004
+++ busybox/include/usage.h Thu Sep 2 16:22:16 2004
@@ -4,14 +4,14 @@
#define addgroup_trivial_usage \
"[-g GID] group_name [user_name]"
#define addgroup_full_usage \
- "Adds a group to the system" \
+ "Adds a group to the system\n\n" \
"Options:\n" \
"\t-g GID\t\tspecify gid"
#define adduser_trivial_usage \
"[OPTIONS] user_name"
#define adduser_full_usage \
- "Adds a user to the system" \
+ "Adds a user to the system\n\n" \
"Options:\n" \
"\t-h DIR\t\tAssign home directory DIR\n" \
"\t-g GECOS\tAssign gecos field GECOS\n" \
Index: busybox/loginutils/adduser.c
diff -u busybox/loginutils/adduser.c:1.10 busybox/loginutils/adduser.c:1.11
--- busybox/loginutils/adduser.c:1.10 Mon Aug 16 03:07:39 2004
+++ busybox/loginutils/adduser.c Thu Sep 2 16:22:17 2004
@@ -305,13 +305,8 @@
if (usegroup) {
/* Add user to a group that already exists */
- struct group *g;
-
- g = getgrnam(usegroup);
- if (g == NULL)
- bb_error_msg_and_die("group %s does not exist", usegroup);
-
- pw.pw_gid = g->gr_gid;
+ pw.pw_gid = my_getgrnam(usegroup);
+ /* exits on error */
}
/* grand finale */
Index: busybox/sysklogd/syslogd.c
diff -u busybox/sysklogd/syslogd.c:1.114 busybox/sysklogd/syslogd.c:1.115
--- busybox/sysklogd/syslogd.c:1.114 Thu Aug 26 17:15:29 2004
+++ busybox/sysklogd/syslogd.c Thu Sep 2 16:22:17 2004
@@ -386,7 +386,9 @@
time_t now;
char *timestamp;
static char res[20] = "";
+#ifdef CONFIG_FEATURE_REMOTE_LOG
static char line[512];
+#endif
CODE *c_pri, *c_fac;
if (pri != 0) {
More information about the busybox-cvs
mailing list