aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-11-29 11:37:34 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-11-29 11:37:34 +0100
commitec16c030bd5527137f95a1c30e6a1f3c9054dcf7 (patch)
tree16beb4e6302936d6015230cab5e3e2a9758ed98f /util-linux
parent87bd558f3f0452ed62f2686472e03a1be4a6e36d (diff)
downloadbusybox-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 'util-linux')
-rw-r--r--util-linux/fdisk.c2
-rw-r--r--util-linux/mdev.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 0fb2e3e17..0df3ebf7d 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -2667,7 +2667,7 @@ reread_partition_table(int leave)
2667 /* Users with slow external USB disks on a 320MHz ARM system (year 2011) 2667 /* Users with slow external USB disks on a 320MHz ARM system (year 2011)
2668 * report that sleep is needed, otherwise BLKRRPART may fail with -EIO: 2668 * report that sleep is needed, otherwise BLKRRPART may fail with -EIO:
2669 */ 2669 */
2670 sleep(1); 2670 sleep1();
2671 i = ioctl_or_perror(dev_fd, BLKRRPART, NULL, 2671 i = ioctl_or_perror(dev_fd, BLKRRPART, NULL,
2672 "WARNING: rereading partition table " 2672 "WARNING: rereading partition table "
2673 "failed, kernel still uses old table"); 2673 "failed, kernel still uses old table");
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index 9a8c14456..ebf83d1a3 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -920,7 +920,7 @@ static void load_firmware(const char *firmware, const char *sysfs_path)
920 loading_fd = open("loading", O_WRONLY); 920 loading_fd = open("loading", O_WRONLY);
921 if (loading_fd >= 0) 921 if (loading_fd >= 0)
922 goto loading; 922 goto loading;
923 sleep(1); 923 sleep1();
924 } 924 }
925 goto out; 925 goto out;
926 926