diff options
author | Karel Zak | 2012-03-30 16:17:49 +0200 |
---|---|---|
committer | Karel Zak | 2012-03-30 16:17:49 +0200 |
commit | 99727496ed2117ec2965ab74fda2020fdac9994e (patch) | |
tree | 0138f5eb8132815b3181786a13007114be03ecd4 /misc-utils/wipefs.c | |
parent | blkid: use strtosize_or_err() (diff) | |
download | kernel-qcow2-util-linux-99727496ed2117ec2965ab74fda2020fdac9994e.tar.gz kernel-qcow2-util-linux-99727496ed2117ec2965ab74fda2020fdac9994e.tar.xz kernel-qcow2-util-linux-99727496ed2117ec2965ab74fda2020fdac9994e.zip |
wipefs: use strtosize_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/wipefs.c')
-rw-r--r-- | misc-utils/wipefs.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c index 74de3a3a3..bd20997a1 100644 --- a/misc-utils/wipefs.c +++ b/misc-utils/wipefs.c @@ -346,16 +346,6 @@ do_wipe(struct wipe_desc *wp, const char *devname, int noact, int all, int quiet return wp; } -static loff_t -strtoll_offset(const char *str) -{ - uintmax_t sz; - - if (strtosize(str, &sz)) - errx(EXIT_FAILURE, _("invalid offset value '%s' specified"), str); - return sz; -} - static void __attribute__((__noreturn__)) usage(FILE *out) @@ -414,7 +404,8 @@ main(int argc, char **argv) noact++; break; case 'o': - wp0 = add_offset(wp0, strtoll_offset(optarg), 1); + wp0 = add_offset(wp0, strtosize_or_err(optarg, + _("failed to parse offset")), 1); has_offset++; break; case 'p': |