summaryrefslogtreecommitdiffstats
path: root/libmount/src/context.c
diff options
context:
space:
mode:
authorKarel Zak2014-04-07 12:09:11 +0200
committerKarel Zak2014-04-07 12:09:11 +0200
commitb6bdccc710642b43694ec49e563cdfc0e9cd81fa (patch)
tree52b30ae1ee0f2480a5338aba7d5c7b1d974e5aed /libmount/src/context.c
parentumount: more robust success message for --all (diff)
downloadkernel-qcow2-util-linux-b6bdccc710642b43694ec49e563cdfc0e9cd81fa.tar.gz
kernel-qcow2-util-linux-b6bdccc710642b43694ec49e563cdfc0e9cd81fa.tar.xz
kernel-qcow2-util-linux-b6bdccc710642b43694ec49e563cdfc0e9cd81fa.zip
mount: apply "nofail" to MNT_ERR_NOSOURCE libmount error
fstab: UUID=nonexist /mnt/nonexist1 ext4 nofail 0 1 # mount -av mount: can't find UUID=nonexist .. this is bug of course. Reported-by: Patrick McLean <chutzpah@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context.c')
-rw-r--r--libmount/src/context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libmount/src/context.c b/libmount/src/context.c
index 2d9795e23..b7278a42d 100644
--- a/libmount/src/context.c
+++ b/libmount/src/context.c
@@ -716,6 +716,11 @@ void *mnt_context_get_mtab_userdata(struct libmnt_context *cxt)
* @cxt: mount context
* @source: mount source (device, directory, UUID, LABEL, ...)
*
+ * Note that libmount does not interpret "nofail" (MNT_MS_NOFAIL)
+ * mount option. The real return code is always returned, when
+ * the device does not exist then it's usually MNT_ERR_NOSOURCE
+ * from libmount or ENOENT, ENOTDIR, ENOTBLK, ENXIO from moun(2).
+ *
* Returns: 0 on success, negative number in case of error.
*/
int mnt_context_set_source(struct libmnt_context *cxt, const char *source)