[PATCH] swapon: remove invalid error string print outs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To avoid messages like this:

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

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 sys-utils/swapon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c
index 193fcbf..ea5fdb2 100644
--- a/sys-utils/swapon.c
+++ b/sys-utils/swapon.c
@@ -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;
 	}
 
-- 
2.0.4

--
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




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux