From ea848180dd344ec2859b5ca329d9b1375ddde1ac Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 27 Apr 2017 14:01:26 +0200 Subject: libmount: add mnt_context_get_excode() It's pretty complex task to make mount(8) and umount(8) return code and generate error message. It seems better to do that in the libmount rather than force all library users to duplicate mount(8) mk_exit_code() functions. It also means that all the messages will be translated only once. Changes: * all error messages are printed by warn() * no more multi-line messages * all messages prefixed by mount target (mountpoint) * library provides mount(8) compatible MNT_EX_* codes Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1429531 Signed-off-by: Karel Zak --- libmount/docs/libmount-sections.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'libmount/docs') diff --git a/libmount/docs/libmount-sections.txt b/libmount/docs/libmount-sections.txt index 1d21879a0..974b83b8f 100644 --- a/libmount/docs/libmount-sections.txt +++ b/libmount/docs/libmount-sections.txt @@ -35,11 +35,12 @@ mnt_context_enable_fork mnt_context_enable_lazy mnt_context_enable_loopdel mnt_context_enable_rdonly_umount -mnt_context_enable_rwonly_mount; +mnt_context_enable_rwonly_mount mnt_context_enable_sloppy mnt_context_enable_verbose -mnt_context_forced_rdonly; +mnt_context_forced_rdonly mnt_context_get_cache +mnt_context_get_excode mnt_context_get_fs mnt_context_get_fstab mnt_context_get_fstab_userdata @@ -74,7 +75,7 @@ mnt_context_is_nomtab mnt_context_is_parent mnt_context_is_rdonly_umount mnt_context_is_restricted -mnt_context_is_rwonly_mount; +mnt_context_is_rwonly_mount mnt_context_is_sloppy mnt_context_is_swapmatch mnt_context_is_verbose @@ -108,6 +109,15 @@ MNT_ERR_NOFSTAB MNT_ERR_NOFSTYPE MNT_ERR_NOSOURCE MNT_ERR_LOOPOVERLAP + +MNT_EX_SUCCESS +MNT_EX_USAGE +MNT_EX_SYSERR +MNT_EX_SOFTWARE +MNT_EX_USER +MNT_EX_FILEIO +MNT_EX_FAIL +MNT_EX_SOMEOK
-- cgit v1.2.3-55-g7522