]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
swapon: remove invalid error string print outs
authorSami Kerola <kerolasa@iki.fi>
Wed, 6 Aug 2014 20:52:18 +0000 (21:52 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 11 Aug 2014 12:51:56 +0000 (14:51 +0200)
To avoid messages like this:

$ swapon /dev/zram0
swapon: /dev/zram0: read swap header failed: Success

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/swapon.c

index 193fcbf43fdb02932f7973436937f5793225378f..ea5fdb28ac4540eeecd103a51c1ab7e9a2343772 100644 (file)
@@ -511,13 +511,13 @@ static int swapon_checks(const char *special)
        }
 
        if (S_ISBLK(st.st_mode) && blkdev_get_size(fd, &devsize)) {
-               warn(_("%s: get size failed"), special);
+               warnx(_("%s: get size failed"), special);
                goto err;
        }
 
        hdr = swap_get_header(fd, &sig, &pagesize);
        if (!hdr) {
-               warn(_("%s: read swap header failed"), special);
+               warnx(_("%s: read swap header failed"), special);
                goto err;
        }