swapon: remove invalid error string print outs

To avoid messages like this:

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

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2014-08-06 21:52:18 +01:00 committed by Karel Zak
parent 1d23119072
commit 3077ff49f3
1 changed files with 2 additions and 2 deletions

View 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;
}