aboutsummaryrefslogtreecommitdiff
path: root/coreutils/split.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/split.c')
-rw-r--r--coreutils/split.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/coreutils/split.c b/coreutils/split.c
index cf26a9322..2306789f0 100644
--- a/coreutils/split.c
+++ b/coreutils/split.c
@@ -68,15 +68,13 @@ int split_main(int argc ATTRIBUTE_UNUSED, char **argv)
ssize_t bytes_read, to_write;
char *src;
- opt_complementary = "?2";
- opt = getopt32(argv, "l:b:a:", &count_p, &count_p, &sfx);
+ opt_complementary = "?2:a+"; /* max 2 args; -a N */
+ opt = getopt32(argv, "l:b:a:", &count_p, &count_p, &suffix_len);
if (opt & SPLIT_OPT_l)
- cnt = xatoul(count_p);
- if (opt & SPLIT_OPT_b)
- cnt = xatoul_sfx(count_p, split_suffices);
- if (opt & SPLIT_OPT_a)
- suffix_len = xatou(sfx);
+ cnt = XATOOFF(count_p);
+ if (opt & SPLIT_OPT_b) // FIXME: also needs XATOOFF
+ cnt = xatoull_sfx(count_p, split_suffices);
sfx = "x";
argv += optind;