]> 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>
Wed, 27 Aug 2014 11:36:17 +0000 (13:36 +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 b50016affa37504757df1c2e4891ba9daa4d6712..b776cc86862ab855450f07eb311a915dc648c2bc 100644 (file)
@@ -485,13 +485,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;
        }