diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-11-29 11:37:34 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-11-29 11:37:34 +0100 |
commit | ec16c030bd5527137f95a1c30e6a1f3c9054dcf7 (patch) | |
tree | 16beb4e6302936d6015230cab5e3e2a9758ed98f /init/halt.c | |
parent | 87bd558f3f0452ed62f2686472e03a1be4a6e36d (diff) | |
download | busybox-w32-ec16c030bd5527137f95a1c30e6a1f3c9054dcf7.tar.gz busybox-w32-ec16c030bd5527137f95a1c30e6a1f3c9054dcf7.tar.bz2 busybox-w32-ec16c030bd5527137f95a1c30e6a1f3c9054dcf7.zip |
libbb: introduce and use sleep1()
function old new delta
sleep1 - 9 +9
run_shutdown_and_kill_processes 97 95 -2
restore_state_and_exit 116 114 -2
reread_partition_table 67 65 -2
flush_buffer_cache 80 78 -2
chat_main 1302 1300 -2
timeout_main 310 307 -3
telnet_main 1235 1232 -3
stop_handler 86 83 -3
process_action 1078 1075 -3
nbdclient_main 1185 1182 -3
init_main 789 786 -3
getty_main 1541 1538 -3
do_time 410 407 -3
runsv_main 1682 1677 -5
pause_and_low_level_reboot 59 54 -5
inetd_main 1917 1911 -6
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/16 up/down: 9/-50) Total: -41 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'init/halt.c')
-rw-r--r-- | init/halt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/init/halt.c b/init/halt.c index 785c38130..2070eaa4d 100644 --- a/init/halt.c +++ b/init/halt.c | |||
@@ -144,14 +144,14 @@ static int init_was_not_there(void) | |||
144 | */ | 144 | */ |
145 | #if 0 | 145 | #if 0 |
146 | while (kill(1, 0) != 0 && --cnt >= 0) | 146 | while (kill(1, 0) != 0 && --cnt >= 0) |
147 | sleep(1); | 147 | sleep1(); |
148 | #endif | 148 | #endif |
149 | /* ... so let's wait for some evidence a usual startup event, | 149 | /* ... so let's wait for some evidence a usual startup event, |
150 | * mounting of /proc, happened. By that time init should be ready | 150 | * mounting of /proc, happened. By that time init should be ready |
151 | * for signals. | 151 | * for signals. |
152 | */ | 152 | */ |
153 | while (access("/proc/meminfo", F_OK) != 0 && --cnt >= 0) | 153 | while (access("/proc/meminfo", F_OK) != 0 && --cnt >= 0) |
154 | sleep(1); | 154 | sleep1(); |
155 | 155 | ||
156 | /* Does it look like init wasn't there? */ | 156 | /* Does it look like init wasn't there? */ |
157 | return (cnt != initial - 1); | 157 | return (cnt != initial - 1); |