summaryrefslogtreecommitdiffstats
path: root/libmount/src/libmount.h.in
diff options
context:
space:
mode:
authorKarel Zak2012-04-24 11:57:32 +0200
committerKarel Zak2012-04-24 11:57:32 +0200
commit47dea49b4cb4a4a98a6c518cc17f6d2c92be9528 (patch)
treed98188844307e45b2d6c636c3e1c3678fabdf589 /libmount/src/libmount.h.in
parentlibmount: fix mount by pattern (diff)
downloadkernel-qcow2-util-linux-47dea49b4cb4a4a98a6c518cc17f6d2c92be9528.tar.gz
kernel-qcow2-util-linux-47dea49b4cb4a4a98a6c518cc17f6d2c92be9528.tar.xz
kernel-qcow2-util-linux-47dea49b4cb4a4a98a6c518cc17f6d2c92be9528.zip
libmount: add special MNT_ERR_ codes
... to detect some situations where standard -errno is too generic. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/libmount.h.in')
-rw-r--r--libmount/src/libmount.h.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in
index 6b347f98f..c88722a9d 100644
--- a/libmount/src/libmount.h.in
+++ b/libmount/src/libmount.h.in
@@ -115,6 +115,18 @@ enum {
MNT_ACT_UMOUNT
};
+/*
+ * Errors -- by default libmount returns -errno for generic errors (ENOMEM,
+ * EINVAL, ...) and for mount(2) errors, but for some specific operations it
+ * returns private error codes. Note that maximum system errno value should be
+ * 4095 on UNIXes.
+ *
+ * See also mnt_context_get_syscall_errno() and mnt_context_get_helper_status().
+ */
+#define MNT_ERR_NOFSTAB 5000 /* not found required entry in fstab */
+#define MNT_ERR_NOFSTYPE 5001 /* failed to detect filesystem type */
+#define MNT_ERR_NOSOURCE 5002 /* required mount source undefined */
+
/* init.c */
extern void mnt_init_debug(int mask);