gunixmounts: Add g_unix_mount_for() support

GLib has g_unix_mount_at (mount_path) already, let's add g_unix_mount_for
(file_path) for whatever path. GLib already contains some private code
for such task. Let's make this code public. This functionality is needed
by GVfs (see Bug 771431) in order to avoid copy-and-pasting.

https://bugzilla.gnome.org/show_bug.cgi?id=772160
This commit is contained in:
Ondrej Holy
2016-09-29 10:45:50 +02:00
committed by Matthias Clasen
parent 67ce530581
commit da509fd67d
5 changed files with 74 additions and 4 deletions

View File

@@ -119,6 +119,9 @@ GList * g_unix_mounts_get (guint64 *time_re
GLIB_AVAILABLE_IN_ALL
GUnixMountEntry *g_unix_mount_at (const char *mount_path,
guint64 *time_read);
GLIB_AVAILABLE_IN_2_52
GUnixMountEntry *g_unix_mount_for (const char *file_path,
guint64 *time_read);
GLIB_AVAILABLE_IN_ALL
gboolean g_unix_mounts_changed_since (guint64 time);
GLIB_AVAILABLE_IN_ALL