[systemd-devel] [PATCH] mount: use libmount to monitor mountinfo & utab

Lennart Poettering lennart at poettering.net
Wed Jun 17 09:27:41 PDT 2015


On Wed, 03.06.15 14:59, Karel Zak (kzak at redhat.com) wrote:

> 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. This patch replaces the current implementation with
> libmount based solution.
> 
> Now the manager.h includes <libmount.h>, so $MOUNT_CFLAGS has been
> necessary to add to many tests CFLAGS.
> 
> Note that mnt_monitor_event_cleanup() in v2.26 is broken, so the patch
> uses mnt_monitor_next_change(). It's exactly the same solution which
> uses the current libmount HEAD (mnt_monitor_event_cleanup() is API
> shorcut only).

For the sake of the archives, this is now tracked on github:

https://github.com/systemd/systemd/pull/194

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list