]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: use MNT_ERR_APPLYFLAGS for failed mount_setattr()
authorKarel Zak <kzak@redhat.com>
Tue, 10 Jan 2023 11:40:47 +0000 (12:40 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 10 Jan 2023 11:40:47 +0000 (12:40 +0100)
commit987d844cdbc0f91ca81de3c1e5d0628a60eb458f
tree4742379685fc49abc6624267b0338e0f17db6d23
parent9e34eed3ca5338b354d872ce71bafb54955660b4
libmount: use MNT_ERR_APPLYFLAGS for failed mount_setattr()

The classic mount(2) based version uses MNT_ERR_APPLYFLAGS when not
able to set flags and errno is EINVAL. This is expected by
mnt_context_get_mount_excode() where libmount generates error messages
for mount(8).

Expected is:

 # mount --make-private /mnt/test
 mount: /mnt/test: not mount point or bad option.

rather than generic error:

 mount: /mnt/test: wrong fs type, bad option, bad superblock on none ...

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/hook_mount.c