diff options
author | Davidlohr Bueso <dave@gnu.org> | 2011-10-14 16:32:15 -0400 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2011-10-17 11:06:48 +0200 |
commit | af7df9ee67248029aa47a3e5b2db6e8cbe1915fd (patch) | |
tree | 601641a175483e90dfb3432467af0bde82139f9e /partx | |
parent | cf48ee22d12f028198a857538369e346d9008a27 (diff) | |
download | util-linux-af7df9ee67248029aa47a3e5b2db6e8cbe1915fd.tar.gz |
lib,strutils: add default value to parse_range()
This function currently sets the low or high values to 0 when the string doesn't
contain a value, like '123:' or ':123'. In order to make it more flexible, we allow it
to be passed an arbitrary value.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Diffstat (limited to 'partx')
-rw-r--r-- | partx/partx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/partx/partx.c b/partx/partx.c index 2631d1fd..bf18a4eb 100644 --- a/partx/partx.c +++ b/partx/partx.c @@ -699,7 +699,7 @@ int main(int argc, char **argv) what = ACT_LIST; break; case 'n': - if (parse_range(optarg, &lower, &upper)) + if (parse_range(optarg, &lower, &upper, 0)) errx(EXIT_FAILURE, _("failed to parse --nr <M-N> range")); break; case 'o': |