]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: (mount) improve syscalls status handling
authorKarel Zak <kzak@redhat.com>
Wed, 21 Sep 2022 09:39:13 +0000 (11:39 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Jan 2023 11:58:42 +0000 (12:58 +0100)
commit11afc49b49d51c534317cafd96ace66ca6845cf6
tree885949445939e027e78c075ef097135a71fdd030
parent2b4c0ebdf4d55801b0d61030b5927bb5723064e4
libmount: (mount) improve syscalls status handling

The new kernel API is composed from more syscalls, but libmount
originally assumes one syscall and one place where we need to remember
return value of the syscall. It seems the best will be to set the
status after each mount related syscall call (fsopen(), move_mount(),
...) until we reach error or end of mount  process.

For better error messages the last failed mount related syscall name
will be recorded in cxt->syscall_name.

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context_mount.c
libmount/src/hook_mount.c
libmount/src/hook_mount_legacy.c
libmount/src/hooks.c
libmount/src/mountP.h