aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-12-21 13:23:14 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-12-21 13:23:14 +0000
commite99be6e4a58561eb7521c57148ec65ba0d87dd7b (patch)
tree3ab3dd4df901851ff7f4345708592118766ba4aa /init
parentec7c757361d94d39f4c947ba1ec3cf6f928fca64 (diff)
downloadbusybox-w32-e99be6e4a58561eb7521c57148ec65ba0d87dd7b.tar.gz
busybox-w32-e99be6e4a58561eb7521c57148ec65ba0d87dd7b.tar.bz2
busybox-w32-e99be6e4a58561eb7521c57148ec65ba0d87dd7b.zip
introduce LONE_CHAR (optimized strcmp with one-char string)
git-svn-id: svn://busybox.net/trunk/busybox@17027 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'init')
-rw-r--r--init/init.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c
index 213a5c149..bc53feeae 100644
--- a/init/init.c
+++ b/init/init.c
@@ -1047,8 +1047,9 @@ int init_main(int argc, char **argv)
1047 } 1047 }
1048 1048
1049 /* Check if we are supposed to be in single user mode */ 1049 /* Check if we are supposed to be in single user mode */
1050 if (argc > 1 && (!strcmp(argv[1], "single") || 1050 if (argc > 1
1051 !strcmp(argv[1], "-s") || !strcmp(argv[1], "1"))) { 1051 && (!strcmp(argv[1], "single") || !strcmp(argv[1], "-s") || LONE_CHAR(argv[1], '1'))
1052 ) {
1052 /* Start a shell on console */ 1053 /* Start a shell on console */
1053 new_init_action(RESPAWN, bb_default_login_shell, ""); 1054 new_init_action(RESPAWN, bb_default_login_shell, "");
1054 } else { 1055 } else {