]> git.ipfire.org Git - thirdparty/util-linux.git/commit - sys-utils/umount.c
mount, umount, swapon, fsck, lsblk, findmnt: ignore malformed lines
authorKarel Zak <kzak@redhat.com>
Thu, 15 Oct 2015 09:53:44 +0000 (11:53 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 15 Oct 2015 10:01:48 +0000 (12:01 +0200)
commit1cd9d0d7463850ef6b16a78b8a55e56dbf9a8db1
tree00d5e1db4f1c5db37f12f223a212d8216b95fa6d
parentd5b7d2912afceac3774d1aaea9e8486b54d4e9e9
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 <kzak@redhat.com>
disk-utils/fsck.c
misc-utils/findmnt.c
misc-utils/lsblk.c
sys-utils/mount.c
sys-utils/swapon-common.c
sys-utils/umount.c