gio: Add g_unix_mount_get_root_path

Currently, there isn't API to determine root path for mounts created
over bind operation (or btrfs subvolumes). This causes issues to our
volume monitors if there is multiple mounts for one device, which can
happen with libmount-based implementation currently. Let's propagate
root path from libmount over g_unix_mount_get_root_path, so we can
handle this somehow in our volume monitors.

https://gitlab.gnome.org/GNOME/glib/issues/1271
This commit is contained in:
Ondrej Holy
2018-04-26 10:37:33 +02:00
parent 035975da09
commit e1fa5ffb91
3 changed files with 41 additions and 1 deletions

View File

@@ -79,6 +79,8 @@ GLIB_AVAILABLE_IN_ALL
const char * g_unix_mount_get_mount_path (GUnixMountEntry *mount_entry);
GLIB_AVAILABLE_IN_ALL
const char * g_unix_mount_get_device_path (GUnixMountEntry *mount_entry);
GLIB_AVAILABLE_IN_2_60
const char * g_unix_mount_get_root_path (GUnixMountEntry *mount_entry);
GLIB_AVAILABLE_IN_ALL
const char * g_unix_mount_get_fs_type (GUnixMountEntry *mount_entry);
GLIB_AVAILABLE_IN_2_58