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
This commit is contained in:
Eric Andersen 2004-09-02 22:22:17 +00:00
parent 7eb79fff10
commit 192c35f6eb
3 changed files with 6 additions and 9 deletions

View File

@ -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" \

View File

@ -305,13 +305,8 @@ int adduser_main(int argc, char **argv)
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 */

View File

@ -386,7 +386,9 @@ static void logMessage(int pri, char *msg)
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) {