From b85edfac45f7af9d673c75c5e112bc62ff694c8e Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 20 May 2001 18:46:09 +0000 Subject: [PATCH] (parse_obsolescent_option): Accept a b suffix. --- src/tail.c | 6 ++++-- 1 file 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