aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2022-01-05 22:16:06 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2022-01-05 22:16:06 +0100
commitdb5546ca101846f18294a43b39883bc4ff53613a (patch)
treef8bb8a4835b70f4693dcf83edfa432c21d0ee77f
parent076f5e064fa7b6cc2c03b030abcf2cbd60514180 (diff)
downloadbusybox-w32-db5546ca101846f18294a43b39883bc4ff53613a.tar.gz
busybox-w32-db5546ca101846f18294a43b39883bc4ff53613a.tar.bz2
busybox-w32-db5546ca101846f18294a43b39883bc4ff53613a.zip
libbb: code shrink: introduce and use [_]exit_SUCCESS()
function old new delta exit_SUCCESS - 7 +7 _exit_SUCCESS - 7 +7 run_pipe 1562 1567 +5 pseudo_exec_argv 399 400 +1 finish 86 87 +1 start_stop_daemon_main 1109 1107 -2 shutdown_on_signal 38 36 -2 runsv_main 1662 1660 -2 redirect 1070 1068 -2 read_line 79 77 -2 pause_and_low_level_reboot 54 52 -2 list_i2c_busses_and_exit 483 481 -2 less_exit 12 10 -2 identify 4123 4121 -2 grep_file 1161 1159 -2 getty_main 1519 1517 -2 fsck_minix_main 2681 2679 -2 free_session 132 130 -2 fdisk_main 4739 4737 -2 clean_up_and_exit 53 51 -2 bsd_select 1566 1564 -2 bb_daemonize_or_rexec 198 196 -2 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/17 up/down: 21/-34) Total: -13 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--debianutils/start_stop_daemon.c4
-rw-r--r--findutils/grep.c2
-rw-r--r--include/libbb.h2
-rw-r--r--init/init.c6
-rw-r--r--libbb/vfork_daemon_rexec.c4
-rw-r--r--libbb/xfuncs.c10
-rw-r--r--loginutils/getty.c6
-rw-r--r--loginutils/login.c2
-rw-r--r--miscutils/devfsd.c4
-rw-r--r--miscutils/hdparm.c2
-rw-r--r--miscutils/i2c_tools.c2
-rw-r--r--miscutils/less.c4
-rw-r--r--miscutils/watchdog.c2
-rw-r--r--modutils/modprobe-small.c2
-rw-r--r--networking/arping.c2
-rw-r--r--networking/inetd.c2
-rw-r--r--networking/nc.c2
-rw-r--r--networking/telnetd.c2
-rw-r--r--runit/runsv.c2
-rw-r--r--shell/ash.c2
-rw-r--r--shell/hush.c4
-rw-r--r--util-linux/fdisk.c4
-rw-r--r--util-linux/fdisk_osf.c4
-rw-r--r--util-linux/fsck_minix.c2
24 files changed, 45 insertions, 33 deletions
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c
index 68df44ae9..3e5dd9faa 100644
--- a/debianutils/start_stop_daemon.c
+++ b/debianutils/start_stop_daemon.c
@@ -519,7 +519,7 @@ int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv)
519 /* why _exit? the child may have changed the stack, 519 /* why _exit? the child may have changed the stack,
520 * so "return 0" may do bad things 520 * so "return 0" may do bad things
521 */ 521 */
522 _exit(EXIT_SUCCESS); 522 _exit_SUCCESS();
523 } 523 }
524 /* Child */ 524 /* Child */
525 setsid(); /* detach from controlling tty */ 525 setsid(); /* detach from controlling tty */
@@ -531,7 +531,7 @@ int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv)
531 */ 531 */
532 pid = xvfork(); 532 pid = xvfork();
533 if (pid != 0) 533 if (pid != 0)
534 _exit(EXIT_SUCCESS); /* Parent */ 534 _exit_SUCCESS(); /* Parent */
535 } 535 }
536 if (opt & OPT_MAKEPID) { 536 if (opt & OPT_MAKEPID) {
537 /* User wants _us_ to make the pidfile */ 537 /* User wants _us_ to make the pidfile */
diff --git a/findutils/grep.c b/findutils/grep.c
index 8600d72fa..0b72812f1 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -470,7 +470,7 @@ static int grep_file(FILE *file)
470 * "exit immediately with zero status 470 * "exit immediately with zero status
471 * if any match is found, 471 * if any match is found,
472 * even if errors were detected" */ 472 * even if errors were detected" */
473 exit(EXIT_SUCCESS); 473 exit_SUCCESS();
474 } 474 }
475 /* -l "print filenames with matches": stop after the first match */ 475 /* -l "print filenames with matches": stop after the first match */
476 if (option_mask32 & OPT_l) { 476 if (option_mask32 & OPT_l) {
diff --git a/include/libbb.h b/include/libbb.h
index 8308d6259..c93058f6d 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1278,6 +1278,8 @@ void set_task_comm(const char *comm) FAST_FUNC;
1278# define re_execed_comm() 0 1278# define re_execed_comm() 0
1279# define set_task_comm(name) ((void)0) 1279# define set_task_comm(name) ((void)0)
1280#endif 1280#endif
1281void exit_SUCCESS(void) NORETURN FAST_FUNC;
1282void _exit_SUCCESS(void) NORETURN FAST_FUNC;
1281 1283
1282/* Helpers for daemonization. 1284/* Helpers for daemonization.
1283 * 1285 *
diff --git a/init/init.c b/init/init.c
index efab5dcb4..785a3b460 100644
--- a/init/init.c
+++ b/init/init.c
@@ -744,7 +744,7 @@ static void pause_and_low_level_reboot(unsigned magic)
744 pid = vfork(); 744 pid = vfork();
745 if (pid == 0) { /* child */ 745 if (pid == 0) { /* child */
746 reboot(magic); 746 reboot(magic);
747 _exit(EXIT_SUCCESS); 747 _exit_SUCCESS();
748 } 748 }
749 /* Used to have "while (1) sleep(1)" here. 749 /* Used to have "while (1) sleep(1)" here.
750 * However, in containers reboot() call is ignored, and with that loop 750 * However, in containers reboot() call is ignored, and with that loop
@@ -752,7 +752,7 @@ static void pause_and_low_level_reboot(unsigned magic)
752 */ 752 */
753 waitpid(pid, NULL, 0); 753 waitpid(pid, NULL, 0);
754 sleep1(); /* paranoia */ 754 sleep1(); /* paranoia */
755 _exit(EXIT_SUCCESS); 755 _exit_SUCCESS();
756} 756}
757 757
758static void run_shutdown_and_kill_processes(void) 758static void run_shutdown_and_kill_processes(void)
@@ -942,7 +942,7 @@ static void reload_inittab(void)
942 for (a = G.init_action_list; a; a = a->next) 942 for (a = G.init_action_list; a; a = a->next)
943 if (a->action_type == 0 && a->pid != 0) 943 if (a->action_type == 0 && a->pid != 0)
944 kill(a->pid, SIGKILL); 944 kill(a->pid, SIGKILL);
945 _exit(EXIT_SUCCESS); 945 _exit_SUCCESS();
946 } 946 }
947 } 947 }
948#endif 948#endif
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c
index 31e97051f..79141936a 100644
--- a/libbb/vfork_daemon_rexec.c
+++ b/libbb/vfork_daemon_rexec.c
@@ -308,7 +308,7 @@ void FAST_FUNC bb_daemonize_or_rexec(int flags, char **argv)
308 /* fflush_all(); - add it in fork_or_rexec() if necessary */ 308 /* fflush_all(); - add it in fork_or_rexec() if necessary */
309 309
310 if (fork_or_rexec(argv)) 310 if (fork_or_rexec(argv))
311 _exit(EXIT_SUCCESS); /* parent */ 311 _exit_SUCCESS(); /* parent */
312 /* if daemonizing, detach from stdio & ctty */ 312 /* if daemonizing, detach from stdio & ctty */
313 setsid(); 313 setsid();
314 dup2(fd, 0); 314 dup2(fd, 0);
@@ -320,7 +320,7 @@ void FAST_FUNC bb_daemonize_or_rexec(int flags, char **argv)
320// * Prevent this: stop being a session leader. 320// * Prevent this: stop being a session leader.
321// */ 321// */
322// if (fork_or_rexec(argv)) 322// if (fork_or_rexec(argv))
323// _exit(EXIT_SUCCESS); /* parent */ 323// _exit_SUCCESS(); /* parent */
324// } 324// }
325 } 325 }
326 while (fd > 2) { 326 while (fd > 2) {
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index c40dcb706..465e5366c 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -423,3 +423,13 @@ int FAST_FUNC wait4pid(pid_t pid)
423 return WTERMSIG(status) + 0x180; 423 return WTERMSIG(status) + 0x180;
424 return 0; 424 return 0;
425} 425}
426
427void FAST_FUNC exit_SUCCESS(void)
428{
429 exit(EXIT_SUCCESS);
430}
431
432void FAST_FUNC _exit_SUCCESS(void)
433{
434 _exit(EXIT_SUCCESS);
435}
diff --git a/loginutils/getty.c b/loginutils/getty.c
index 6c6d409f4..cd6378d80 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -484,7 +484,7 @@ static char *get_logname(void)
484 if (read(STDIN_FILENO, &c, 1) < 1) { 484 if (read(STDIN_FILENO, &c, 1) < 1) {
485 finalize_tty_attrs(); 485 finalize_tty_attrs();
486 if (errno == EINTR || errno == EIO) 486 if (errno == EINTR || errno == EIO)
487 exit(EXIT_SUCCESS); 487 exit_SUCCESS();
488 bb_simple_perror_msg_and_die(bb_msg_read_error); 488 bb_simple_perror_msg_and_die(bb_msg_read_error);
489 } 489 }
490 490
@@ -511,7 +511,7 @@ static char *get_logname(void)
511 case CTL('C'): 511 case CTL('C'):
512 case CTL('D'): 512 case CTL('D'):
513 finalize_tty_attrs(); 513 finalize_tty_attrs();
514 exit(EXIT_SUCCESS); 514 exit_SUCCESS();
515 case '\0': 515 case '\0':
516 /* BREAK. If we have speeds to try, 516 /* BREAK. If we have speeds to try,
517 * return NULL (will switch speeds and return here) */ 517 * return NULL (will switch speeds and return here) */
@@ -538,7 +538,7 @@ static char *get_logname(void)
538static void alarm_handler(int sig UNUSED_PARAM) 538static void alarm_handler(int sig UNUSED_PARAM)
539{ 539{
540 finalize_tty_attrs(); 540 finalize_tty_attrs();
541 _exit(EXIT_SUCCESS); 541 _exit_SUCCESS();
542} 542}
543 543
544static void sleep10(void) 544static void sleep10(void)
diff --git a/loginutils/login.c b/loginutils/login.c
index ce87e318a..569053c12 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -312,7 +312,7 @@ static void alarm_handler(int sig UNUSED_PARAM)
312 /* unix API is brain damaged regarding O_NONBLOCK, 312 /* unix API is brain damaged regarding O_NONBLOCK,
313 * we should undo it, or else we can affect other processes */ 313 * we should undo it, or else we can affect other processes */
314 ndelay_off(STDOUT_FILENO); 314 ndelay_off(STDOUT_FILENO);
315 _exit(EXIT_SUCCESS); 315 _exit_SUCCESS();
316} 316}
317 317
318int login_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 318int login_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index e5bb8a2d8..839d00fd0 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -453,7 +453,7 @@ int devfsd_main(int argc, char **argv)
453 DEVFSD_PROTOCOL_REVISION_DAEMON, bb_msg_proto_rev, proto_rev); 453 DEVFSD_PROTOCOL_REVISION_DAEMON, bb_msg_proto_rev, proto_rev);
454 if (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev) 454 if (DEVFSD_PROTOCOL_REVISION_DAEMON != proto_rev)
455 bb_error_msg_and_die("%s mismatch!", bb_msg_proto_rev); 455 bb_error_msg_and_die("%s mismatch!", bb_msg_proto_rev);
456 exit(EXIT_SUCCESS); /* -v */ 456 exit_SUCCESS(); /* -v */
457 } 457 }
458 /* Tell kernel we are special(i.e. we get to see hidden entries) */ 458 /* Tell kernel we are special(i.e. we get to see hidden entries) */
459 xioctl(fd, DEVFSDIOC_SET_EVENT_MASK, 0); 459 xioctl(fd, DEVFSDIOC_SET_EVENT_MASK, 0);
@@ -474,7 +474,7 @@ int devfsd_main(int argc, char **argv)
474 dir_operation(SERVICE, mount_point, 0, NULL); 474 dir_operation(SERVICE, mount_point, 0, NULL);
475 475
476 if (ENABLE_DEVFSD_FG_NP && no_polling) 476 if (ENABLE_DEVFSD_FG_NP && no_polling)
477 exit(EXIT_SUCCESS); 477 exit_SUCCESS();
478 478
479 if (ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG) 479 if (ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG)
480 logmode = LOGMODE_BOTH; 480 logmode = LOGMODE_BOTH;
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 01b4e8e2e..d8d8f6166 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -1271,7 +1271,7 @@ static void identify(uint16_t *val)
1271 } 1271 }
1272 } 1272 }
1273 1273
1274 exit(EXIT_SUCCESS); 1274 exit_SUCCESS();
1275} 1275}
1276#endif 1276#endif
1277 1277
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index b25d49792..e3741eeba 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -1212,7 +1212,7 @@ static void NORETURN list_i2c_busses_and_exit(void)
1212 } 1212 }
1213 } 1213 }
1214 1214
1215 exit(EXIT_SUCCESS); 1215 exit_SUCCESS();
1216} 1216}
1217 1217
1218static void NORETURN no_support(const char *cmd) 1218static void NORETURN no_support(const char *cmd)
diff --git a/miscutils/less.c b/miscutils/less.c
index 6825e5577..82c4b21f0 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -333,10 +333,10 @@ static void restore_tty(void)
333 clear_line(); 333 clear_line();
334} 334}
335 335
336static void less_exit(void) 336static NOINLINE void less_exit(void)
337{ 337{
338 restore_tty(); 338 restore_tty();
339 exit(EXIT_SUCCESS); 339 exit_SUCCESS();
340} 340}
341 341
342#if (ENABLE_FEATURE_LESS_DASHCMD && ENABLE_FEATURE_LESS_LINENUMS) \ 342#if (ENABLE_FEATURE_LESS_DASHCMD && ENABLE_FEATURE_LESS_LINENUMS) \
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c
index d8e9c78f5..9f5a4b849 100644
--- a/miscutils/watchdog.c
+++ b/miscutils/watchdog.c
@@ -76,7 +76,7 @@ static void shutdown_on_signal(int sig UNUSED_PARAM)
76{ 76{
77 remove_pidfile_std_path_and_ext("watchdog"); 77 remove_pidfile_std_path_and_ext("watchdog");
78 shutdown_watchdog(); 78 shutdown_watchdog();
79 _exit(EXIT_SUCCESS); 79 _exit_SUCCESS();
80} 80}
81 81
82static void watchdog_open(const char* device) 82static void watchdog_open(const char* device)
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index db44a2ed0..b61651621 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -415,7 +415,7 @@ static FAST_FUNC int fileAction(struct recursive_state *state,
415 /* Load was successful, there is nothing else to do. 415 /* Load was successful, there is nothing else to do.
416 * This can happen ONLY for "top-level" module load, 416 * This can happen ONLY for "top-level" module load,
417 * not a dep, because deps don't do dirscan. */ 417 * not a dep, because deps don't do dirscan. */
418 exit(EXIT_SUCCESS); 418 exit_SUCCESS();
419 } 419 }
420 } 420 }
421 421
diff --git a/networking/arping.c b/networking/arping.c
index d44d7d697..86f0221ed 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -159,7 +159,7 @@ static void finish(void)
159 if (option_mask32 & DAD) 159 if (option_mask32 & DAD)
160 exit(!!received); 160 exit(!!received);
161 if (option_mask32 & UNSOLICITED) 161 if (option_mask32 & UNSOLICITED)
162 exit(EXIT_SUCCESS); 162 exit_SUCCESS();
163 exit(!received); 163 exit(!received);
164} 164}
165 165
diff --git a/networking/inetd.c b/networking/inetd.c
index e5352a555..e71be51c3 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -1208,7 +1208,7 @@ static void clean_up_and_exit(int sig UNUSED_PARAM)
1208 close(sep->se_fd); 1208 close(sep->se_fd);
1209 } 1209 }
1210 remove_pidfile_std_path_and_ext("inetd"); 1210 remove_pidfile_std_path_and_ext("inetd");
1211 exit(EXIT_SUCCESS); 1211 exit_SUCCESS();
1212} 1212}
1213 1213
1214int inetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 1214int inetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/networking/nc.c b/networking/nc.c
index d351bf72a..ab1316339 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -268,7 +268,7 @@ int nc_main(int argc, char **argv)
268 nread = safe_read(pfds[fdidx].fd, iobuf, COMMON_BUFSIZE); 268 nread = safe_read(pfds[fdidx].fd, iobuf, COMMON_BUFSIZE);
269 if (fdidx != 0) { 269 if (fdidx != 0) {
270 if (nread < 1) 270 if (nread < 1)
271 exit(EXIT_SUCCESS); 271 exit_SUCCESS();
272 ofd = STDOUT_FILENO; 272 ofd = STDOUT_FILENO;
273 } else { 273 } else {
274 if (nread < 1) { 274 if (nread < 1) {
diff --git a/networking/telnetd.c b/networking/telnetd.c
index 581da1924..0805e464f 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -582,7 +582,7 @@ free_session(struct tsession *ts)
582 struct tsession *t; 582 struct tsession *t;
583 583
584 if (option_mask32 & OPT_INETD) 584 if (option_mask32 & OPT_INETD)
585 exit(EXIT_SUCCESS); 585 exit_SUCCESS();
586 586
587 /* Unlink this telnet session from the session list */ 587 /* Unlink this telnet session from the session list */
588 t = G.sessions; 588 t = G.sessions;
diff --git a/runit/runsv.c b/runit/runsv.c
index a4b8af494..6ad6bf46e 100644
--- a/runit/runsv.c
+++ b/runit/runsv.c
@@ -700,7 +700,7 @@ int runsv_main(int argc UNUSED_PARAM, char **argv)
700 700
701 if (svd[0].sd_want == W_EXIT && svd[0].state == S_DOWN) { 701 if (svd[0].sd_want == W_EXIT && svd[0].state == S_DOWN) {
702 if (svd[1].pid == 0) 702 if (svd[1].pid == 0)
703 _exit(EXIT_SUCCESS); 703 _exit_SUCCESS();
704 if (svd[1].sd_want != W_EXIT) { 704 if (svd[1].sd_want != W_EXIT) {
705 svd[1].sd_want = W_EXIT; 705 svd[1].sd_want = W_EXIT;
706 /* stopservice(&svd[1]); */ 706 /* stopservice(&svd[1]); */
diff --git a/shell/ash.c b/shell/ash.c
index 827643808..4a8ec0c03 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -5505,7 +5505,7 @@ openhere(union node *redir)
5505 ignoresig(SIGTSTP); //signal(SIGTSTP, SIG_IGN); 5505 ignoresig(SIGTSTP); //signal(SIGTSTP, SIG_IGN);
5506 signal(SIGPIPE, SIG_DFL); 5506 signal(SIGPIPE, SIG_DFL);
5507 xwrite(pip[1], p, len); 5507 xwrite(pip[1], p, len);
5508 _exit(EXIT_SUCCESS); 5508 _exit_SUCCESS();
5509 } 5509 }
5510 out: 5510 out:
5511 close(pip[1]); 5511 close(pip[1]);
diff --git a/shell/hush.c b/shell/hush.c
index 6a27b1634..982fc356a 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -8587,7 +8587,7 @@ static NOINLINE void pseudo_exec_argv(nommu_save_t *nommu_save,
8587 * expand_assignments(): think about ... | var=`sleep 1` | ... 8587 * expand_assignments(): think about ... | var=`sleep 1` | ...
8588 */ 8588 */
8589 free_strings(new_env); 8589 free_strings(new_env);
8590 _exit(EXIT_SUCCESS); 8590 _exit_SUCCESS();
8591 } 8591 }
8592 8592
8593 sv_shadowed = G.shadowed_vars_pp; 8593 sv_shadowed = G.shadowed_vars_pp;
@@ -8768,7 +8768,7 @@ static void pseudo_exec(nommu_save_t *nommu_save,
8768 8768
8769 /* Case when we are here: ... | >file */ 8769 /* Case when we are here: ... | >file */
8770 debug_printf_exec("pseudo_exec'ed null command\n"); 8770 debug_printf_exec("pseudo_exec'ed null command\n");
8771 _exit(EXIT_SUCCESS); 8771 _exit_SUCCESS();
8772} 8772}
8773 8773
8774#if ENABLE_HUSH_JOB 8774#if ENABLE_HUSH_JOB
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 1c2a7d683..9c393b8fc 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -665,7 +665,7 @@ read_line(const char *prompt)
665 665
666 sz = read_line_input(NULL, prompt, line_buffer, sizeof(line_buffer)); 666 sz = read_line_input(NULL, prompt, line_buffer, sizeof(line_buffer));
667 if (sz <= 0) 667 if (sz <= 0)
668 exit(EXIT_SUCCESS); /* Ctrl-D or Ctrl-C */ 668 exit_SUCCESS(); /* Ctrl-D or Ctrl-C */
669 669
670 if (line_buffer[sz-1] == '\n') 670 if (line_buffer[sz-1] == '\n')
671 line_buffer[--sz] = '\0'; 671 line_buffer[--sz] = '\0';
@@ -2855,7 +2855,7 @@ xselect(void)
2855 if (ENABLE_FEATURE_CLEAN_UP) 2855 if (ENABLE_FEATURE_CLEAN_UP)
2856 close_dev_fd(); 2856 close_dev_fd();
2857 bb_putchar('\n'); 2857 bb_putchar('\n');
2858 exit(EXIT_SUCCESS); 2858 exit_SUCCESS();
2859 case 'r': 2859 case 'r':
2860 return; 2860 return;
2861 case 's': 2861 case 's':
diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c
index 765740ff1..6c66c130d 100644
--- a/util-linux/fdisk_osf.c
+++ b/util-linux/fdisk_osf.c
@@ -383,7 +383,7 @@ bsd_select(void)
383 383
384 if (xbsd_readlabel(NULL) == 0) 384 if (xbsd_readlabel(NULL) == 0)
385 if (xbsd_create_disklabel() == 0) 385 if (xbsd_create_disklabel() == 0)
386 exit(EXIT_SUCCESS); 386 exit_SUCCESS();
387 387
388#endif 388#endif
389 389
@@ -411,7 +411,7 @@ bsd_select(void)
411 case 'q': 411 case 'q':
412 if (ENABLE_FEATURE_CLEAN_UP) 412 if (ENABLE_FEATURE_CLEAN_UP)
413 close_dev_fd(); 413 close_dev_fd();
414 exit(EXIT_SUCCESS); 414 exit_SUCCESS();
415 case 'r': 415 case 'r':
416 return; 416 return;
417 case 's': 417 case 's':
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 40b86d01b..dd2265c32 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -423,7 +423,7 @@ static void check_mount(void)
423 cont = ask("Do you really want to continue", 0); 423 cont = ask("Do you really want to continue", 0);
424 if (!cont) { 424 if (!cont) {
425 puts("Check aborted"); 425 puts("Check aborted");
426 exit(EXIT_SUCCESS); 426 exit_SUCCESS();
427 } 427 }
428 } 428 }
429} 429}