diff options
author | Karel Zak <kzak@redhat.com> | 2015-06-01 13:48:01 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2015-09-14 09:12:31 +0200 |
commit | d379d44255469f03994832ab5821bf1b9034f4dc (patch) | |
tree | 27194587d38c4ea1333e67caed64202ecca9ec20 /src/core/manager.h | |
parent | 5669ef3644e3044036eeaaf6bb4b1a6a7e63130c (diff) |
mount: use libmount to monitor mountinfo & utab
The current implementation directly monitor /proc/self/mountinfo and
/run/mount/utab files. It's really not optimal because utab file is
private libmount stuff without any official guaranteed semantic.
The libmount since v2.26 provides API to monitor mount kernel &
userspace changes and since v2.27 the monitor is usable for
non-root users too.
This patch replaces the current implementation with libmount based
solution.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'src/core/manager.h')
-rw-r--r-- | src/core/manager.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/manager.h b/src/core/manager.h index 5cf0dbd508..7b896f9bc7 100644 --- a/src/core/manager.h +++ b/src/core/manager.h @@ -23,6 +23,7 @@ #include <stdbool.h> #include <stdio.h> +#include <libmount.h> #include "sd-bus.h" #include "sd-event.h" @@ -176,10 +177,8 @@ struct Manager { Hashmap *devices_by_sysfs; /* Data specific to the mount subsystem */ - FILE *proc_self_mountinfo; + struct libmnt_monitor *mount_monitor; sd_event_source *mount_event_source; - int utab_inotify_fd; - sd_event_source *mount_utab_event_source; /* Data specific to the swap filesystem */ FILE *proc_swaps; |