summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-05-20 18:46:09 +0000
committerJim Meyering <jim@meyering.net>2001-05-20 18:46:09 +0000
commitb85edfac45f7af9d673c75c5e112bc62ff694c8e (patch)
tree1f407e04b0c73430875aa2b04d8535b3d1be75e3 /src
parent67785d9d8212e8470758d62e2e718163cd18c9d0 (diff)
downloadcoreutils-b85edfac45f7af9d673c75c5e112bc62ff694c8e.tar.xz
(parse_obsolescent_option): Accept a b suffix.
Diffstat (limited to 'src')
-rw-r--r--src/tail.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tail.c b/src/tail.c
index 9ffba13d7..c89ad97e5 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -1253,7 +1253,7 @@ parse_obsolescent_option (int argc, const char *const *argv,
n_string_end = p;
t_count_lines = 1;
- if (*p == 'c')
+ if (*p == 'c' || *p == 'b')
{
t_count_lines = 0;
++p;
@@ -1296,7 +1296,9 @@ parse_obsolescent_option (int argc, const char *const *argv,
strtol_error s_err;
unsigned long int tmp_ulong;
char *end;
- s_err = xstrtoul (n_string, &end, 10, &tmp_ulong, NULL);
+
+ s_err = xstrtoul (n_string, &end, 10, &tmp_ulong,
+ *n_string_end == 'b' ? "b" : NULL);
if (s_err == LONGINT_OK && tmp_ulong <= OFF_T_MAX)
*n_units = (off_t) tmp_ulong;
else