old version:
# blockdev --setfra 4x096 /dev/sdc
new version:
# blockdev --setfra 4x096 /dev/sdc
blockdev: failed to parse command argument: '4x096'
Addresses: https://github.com/karelzak/util-linux/issues/1358
Signed-off-by: Karel Zak <kzak@redhat.com>
#include "blkdev.h"
#include "pathnames.h"
#include "closestream.h"
+#include "strutils.h"
#include "sysfs.h"
struct bdc {
bdcms[j].name);
errtryhelp(EXIT_FAILURE);
}
- iarg = atoi(argv[++i]);
+ iarg = strtos32_or_err(argv[++i], _("failed to parse command argument"));
} else
iarg = bdcms[j].argval;