diff options
author | Denis Vlasenko | 2007-09-10 13:15:28 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-09-10 13:15:28 +0000 |
commit | a2f61012b6f93473ed002e6609557cb1cd81b7dd (patch) | |
tree | 51ce422afbda2249a5de22e834ed04e200e0961f /loginutils/login.c | |
parent | ac074b3f87cc22c2ddadb074d630156fea720744 (diff) | |
download | busybox-a2f61012b6f93473ed002e6609557cb1cd81b7dd.zip busybox-a2f61012b6f93473ed002e6609557cb1cd81b7dd.tar.gz |
setup_environment: code shrink
run_shell: mark as NORETURN
setup_environment, run_shell: add usage comments
login: add FIXME :(
function old new delta
UNSPEC_print 64 66 +2
sulogin_main 509 506 -3
mkfs_minix_main 3070 3067 -3
login_main 1615 1612 -3
su_main 461 448 -13
setup_environment 261 206 -55
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/5 up/down: 2/-77) Total: -75 bytes
text data bss dec hex filename
772578 1051 10724 784353 bf7e1 busybox_old
772502 1051 10724 784277 bf795 busybox_unstripped
Diffstat (limited to 'loginutils/login.c')
-rw-r--r-- | loginutils/login.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/loginutils/login.c b/loginutils/login.c index 5d50538..7f89075 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -432,7 +432,9 @@ int login_main(int argc, char **argv) tmp = pw->pw_shell; if (!tmp || !*tmp) tmp = DEFAULT_SHELL; + /* setup_environment params: shell, loginshell, changeenv, pw */ setup_environment(tmp, 1, !(opt & LOGIN_OPT_p), pw); + /* FIXME: login shell = 1 -> 3rd parameter is ignored! */ motd(); @@ -463,7 +465,8 @@ int login_main(int argc, char **argv) * should it leave SIGINT etc enabled or disabled? */ signal(SIGINT, SIG_DFL); - run_shell(tmp, 1, 0, 0); /* exec the shell finally */ + /* Exec login shell with no additional parameters */ + run_shell(tmp, 1, NULL, NULL); - return EXIT_FAILURE; + /* return EXIT_FAILURE; - not reached */ } |