The usage output changes too often making unnecessarily expected output in test unstable. Besides in this case the usage ouput does not even help user, because invalid swap target size error cannot be fixed by specificing an option. Signed-off-by: Sami Kerola <kerolasa@xxxxxx> --- disk-utils/mkswap.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index a2c6529..ae73f80 100644 --- a/disk-utils/mkswap.c +++ b/disk-utils/mkswap.c @@ -545,18 +545,16 @@ main(int argc, char **argv) { sz = get_size(device_name); if (!PAGES) PAGES = sz; - else if (PAGES > sz && !force) { + else if (PAGES > sz && !force) errx(EXIT_FAILURE, _("error: " "size %llu KiB is larger than device size %llu KiB"), PAGES*(pagesize/1024), sz*(pagesize/1024)); - } - if (PAGES < MIN_GOODPAGES) { - warnx(_("error: swap area needs to be at least %ld KiB"), - (long)(MIN_GOODPAGES * pagesize/1024)); - usage(stderr); - } + if (PAGES < MIN_GOODPAGES) + errx(EXIT_FAILURE, + _("error: swap area needs to be at least %ld KiB"), + (long)(MIN_GOODPAGES * pagesize / 1024)); #ifdef __linux__ if (get_linux_version() >= KERNEL_VERSION(2,3,4)) -- 1.9.0 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html