From 1cd9d0d7463850ef6b16a78b8a55e56dbf9a8db1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 15 Oct 2015 11:53:44 +0200 Subject: mount, umount, swapon, fsck, lsblk, findmnt: ignore malformed lines The libmount provides way how to deal with parsing errors in fstab -- on error callback function is executed and according to the return libmount manipulate with the malformed line, possible are three states: 1/ fatal error; all file ignored (callback rc < 0) 2/ recoverable error; malformed line ignored (callback rc > 0) 3/ ignore the error (callback rc == 0) The 2/ is the default if no callback specified. Unfortunately our utils uses 3/. The correct way is to use 2/. Signed-off-by: Karel Zak --- sys-utils/umount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys-utils/umount.c') diff --git a/sys-utils/umount.c b/sys-utils/umount.c index 464c4c87f..1d866fa1a 100644 --- a/sys-utils/umount.c +++ b/sys-utils/umount.c @@ -45,7 +45,7 @@ static int table_parser_errcb(struct libmnt_table *tb __attribute__((__unused__) if (filename) warnx(_("%s: parse error: ignore entry at line %d."), filename, line); - return 0; + return 1; } -- cgit v1.2.3-55-g7522