GNOME Bugzilla – Bug 772160
Add g_unix_mount_for() support
Last modified: 2016-11-22 18:21:58 UTC
GLib has g_unix_mount_at (mount_path) already, it would be nice to add g_unix_mount_for (file_path) for whatever path.
Created attachment 336489 [details] [review] glib: Add 2.52 availibity macros
Created attachment 336490 [details] [review] 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.
Review of attachment 336490 [details] [review]: This patch adds a glocalfileprivate.h to the Makefile, but it is not included in the patch. Does it already exist ? In that case, I would break the Makefile change out as a separate fix
Thanks for the review. No, the file doesn't exist, I just forgot to add it in the patch, sorry...
Created attachment 337050 [details] [review] 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.
Attachment 337050 [details] pushed as da509fd - gunixmounts: Add g_unix_mount_for() support
Created attachment 338382 [details] [review] gunixmounts: Fix crash if path doesn't exist g_unix_mount_for segfaults for nonexistent paths. Return NULL if path doesn't exist.
Review of attachment 338382 [details] [review]: OK.
Attachment 338382 [details] pushed as b626a46 - gunixmounts: Fix crash if path doesn't exist