From 6ca409e0e4c198fe3081346eebbae3f068fe605a Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 12 Aug 2007 20:58:27 +0000 Subject: trylink: produce even more info about final link stage trylink: explain how to modify link and drastically decrease amount of padding (unfortunately, needs hand editing ATM). *: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts size saving: 0.5k --- loginutils/adduser.c | 3 ++- loginutils/chpasswd.c | 2 +- loginutils/getty.c | 2 +- loginutils/sulogin.c | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'loginutils') diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 6c69aaf..79cd2f4 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c @@ -81,7 +81,8 @@ static void passwd_wrapper(const char *login) ATTRIBUTE_NORETURN; static void passwd_wrapper(const char *login) { - static const char prog[] = "passwd"; + static const char prog[] ALIGN1 = "passwd"; + BB_EXECLP(prog, prog, login, NULL); bb_error_msg_and_die("failed to execute '%s', you must set the password for '%s' manually", prog, login); } diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c index 3e02c8e..6fb4dca 100644 --- a/loginutils/chpasswd.c +++ b/loginutils/chpasswd.c @@ -11,7 +11,7 @@ #if ENABLE_GETOPT_LONG #include -static const char chpasswd_longopts[] = +static const char chpasswd_longopts[] ALIGN1 = "encrypted\0" No_argument "e" "md5\0" No_argument "m" ; diff --git a/loginutils/getty.c b/loginutils/getty.c index 2fcb0d9..0254d32 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -93,7 +93,7 @@ struct options { int speeds[MAX_SPEED]; /* baud rates to be tried */ }; -static const char opt_string[] = "I:LH:f:hil:mt:wn"; +static const char opt_string[] ALIGN1 = "I:LH:f:hil:mt:wn"; #define F_INITSTRING (1<<0) /* initstring is set */ #define F_LOCAL (1<<1) /* force local */ #define F_FAKEHOST (1<<2) /* force fakehost */ diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 36b10fb..5638c4b 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c @@ -9,7 +9,7 @@ #include "libbb.h" -static const char * const forbid[] = { +static const char *const forbid[] = { "ENV", "BASH_ENV", "HOME", @@ -40,7 +40,7 @@ int sulogin_main(int argc, char **argv) char *cp; int timeout = 0; char *timeout_arg; - const char * const *p; + const char *const *p; struct passwd *pwd; const char *shell; #if ENABLE_FEATURE_SHADOWPASSWDS -- cgit v1.1