aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/fdisk.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-09-11 16:35:14 -0500
committerRob Landley <rob@landley.net>2015-09-11 16:35:14 -0500
commite5354ca12a232b3f97726214254a868771cb70d1 (patch)
treeba373c24ede64b8a18f11a02cf834ce99aa586bf /toys/pending/fdisk.c
parentd067571abb2b7934f3350c90ca891beb987c68fd (diff)
downloadtoybox-e5354ca12a232b3f97726214254a868771cb70d1.tar.gz
Replace toys.exithelp with help_exit() in lib.
Diffstat (limited to 'toys/pending/fdisk.c')
-rw-r--r--toys/pending/fdisk.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/toys/pending/fdisk.c b/toys/pending/fdisk.c
index 3ee9f598..d000c055 100644
--- a/toys/pending/fdisk.c
+++ b/toys/pending/fdisk.c
@@ -151,9 +151,9 @@ static void read_sec_sz()
if (ioctl(dev_fd, BLKSSZGET, &arg) == 0) g_sect_size = arg;
if (toys.optflags & FLAG_b) {
if (TT.sect_sz != 512 && TT.sect_sz != 1024 && TT.sect_sz != 2048 &&
- TT.sect_sz != 4096) {
- toys.exithelp++;
- error_exit("bad sector size");
+ TT.sect_sz != 4096)
+ {
+ help_exit("bad sector size");
}
g_sect_size = TT.sect_sz;
}
@@ -1486,11 +1486,7 @@ void fdisk_main(void)
toys.exitval = 0;
return;
} else {
- if (!toys.optc || toys.optc > 1 ) {
- toys.exitval = toys.exithelp = 1;
- show_help();
- return;
- }
+ if (toys.optc != 1) help_exit(stdout);
if (read_mbr(toys.optargs[0], 1)) return;
while (1) {
xputc('\n');