summarylogtreecommitdiffstats
path: root/0001-libmount-monitor-don-t-check-for-regular-mtab.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-libmount-monitor-don-t-check-for-regular-mtab.patch')
-rw-r--r--0001-libmount-monitor-don-t-check-for-regular-mtab.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/0001-libmount-monitor-don-t-check-for-regular-mtab.patch b/0001-libmount-monitor-don-t-check-for-regular-mtab.patch
new file mode 100644
index 000000000000..5a6372d7882d
--- /dev/null
+++ b/0001-libmount-monitor-don-t-check-for-regular-mtab.patch
@@ -0,0 +1,45 @@
+From 02501746545ef729cefed28b5feb0b4e59c3d34f Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Fri, 11 Sep 2015 11:19:30 +0200
+Subject: [PATCH] libmount: (monitor) don't check for regular mtab
+
+The monitor supports utab only (as documented). It's application
+responsibility to use libmount in the right way. It's overkill to
+check for valid environment during monitor initialization.
+
+For example systemd checks for regular mtab during boot, it's better
+than try to be smart later in libmount monitor when system is already
+running.
+
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ libmount/src/monitor.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/libmount/src/monitor.c b/libmount/src/monitor.c
+index cc3854e..ca9e02c 100644
+--- a/libmount/src/monitor.c
++++ b/libmount/src/monitor.c
+@@ -220,7 +220,7 @@ static int userspace_add_watch(struct monitor_entry *me, int *final, int *fd)
+ assert(me->path);
+
+ /*
+- * libmount uses rename(2) to atomically update utab/mtab, monitor
++ * libmount uses rename(2) to atomically update utab, monitor
+ * rename changes is too tricky. It seems better to monitor utab
+ * lockfile close.
+ */
+@@ -399,10 +399,6 @@ int mnt_monitor_enable_userspace(struct libmnt_monitor *mn, int enable, const ch
+
+ DBG(MONITOR, ul_debugobj(mn, "allocate new userspace monitor"));
+
+- /* create a new entry */
+- if (mnt_has_regular_mtab(NULL, NULL))
+- return -ENOSYS;
+-
+ if (!filename)
+ filename = mnt_get_utab_path(); /* /run/mount/utab */
+ if (!filename) {
+--
+2.5.3
+