diff options
author | Karel Zak | 2017-09-15 14:30:06 +0200 |
---|---|---|
committer | Karel Zak | 2017-09-15 14:30:06 +0200 |
commit | d369dc42cb4974d6a928ae28ed32fa11b528e5fb (patch) | |
tree | ffa3e5f491285c84cc5cad85d73b929917fabc30 /libmount/src/libmount.h.in | |
parent | libsmartcols: fix heap-buffer-overflow when move columns (diff) | |
download | kernel-qcow2-util-linux-d369dc42cb4974d6a928ae28ed32fa11b528e5fb.tar.gz kernel-qcow2-util-linux-d369dc42cb4974d6a928ae28ed32fa11b528e5fb.tar.xz kernel-qcow2-util-linux-d369dc42cb4974d6a928ae28ed32fa11b528e5fb.zip |
libmount: export locking errors as MNT_EX_FILEIO
The mount man page assumes locking errors mapped to MNT_EX_FILEIO (16)
return code. Unfortunately, this is internally not exported as a
special error code, so it's returned as a generic (errno based)
stuff. This patch fixes this issue.
Note that we still use locking for example for utab or when enabled
/etc/mtab (disabled by default).
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/libmount.h.in')
-rw-r--r-- | libmount/src/libmount.h.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in index 123145fc4..463b8ddcc 100644 --- a/libmount/src/libmount.h.in +++ b/libmount/src/libmount.h.in @@ -184,6 +184,12 @@ enum { * detected overlapping loop device that cannot be re-used */ #define MNT_ERR_LOOPOVERLAP 5007 +/** + * MNT_ERR_LOCK: + * + * failed to lock mtab/utab or so. + */ +#define MNT_ERR_LOCK 5008 /* @@ -230,7 +236,7 @@ enum { /** * MNT_EX_FILEIO: * - * [u]mount(8) exit code: problems writing, locking, ... mtab/fstab + * [u]mount(8) exit code: problems writing, locking, ... mtab/utab */ #define MNT_EX_FILEIO 16 |