After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772160 - Add g_unix_mount_for() support
Add g_unix_mount_for() support
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 771431
 
 
Reported: 2016-09-29 09:55 UTC by Ondrej Holy
Modified: 2016-11-22 18:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib: Add 2.52 availibity macros (2.47 KB, patch)
2016-09-29 09:57 UTC, Ondrej Holy
none Details | Review
gunixmounts: Add g_unix_mount_for() support (3.96 KB, patch)
2016-09-29 09:57 UTC, Ondrej Holy
none Details | Review
gunixmounts: Add g_unix_mount_for() support (5.26 KB, patch)
2016-10-06 09:31 UTC, Ondrej Holy
committed Details | Review
gunixmounts: Fix crash if path doesn't exist (949 bytes, patch)
2016-10-25 07:06 UTC, Ondrej Holy
committed Details | Review

Description Ondrej Holy 2016-09-29 09:55:45 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.
Comment 1 Ondrej Holy 2016-09-29 09:57:29 UTC
Created attachment 336489 [details] [review]
glib: Add 2.52 availibity macros
Comment 2 Ondrej Holy 2016-09-29 09:57:53 UTC
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.
Comment 3 Matthias Clasen 2016-10-05 18:31:10 UTC
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
Comment 4 Ondrej Holy 2016-10-06 09:02:47 UTC
Thanks for the review. No, the file doesn't exist, I just forgot to add it in the patch, sorry...
Comment 5 Ondrej Holy 2016-10-06 09:31:45 UTC
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.
Comment 6 Matthias Clasen 2016-10-12 19:13:27 UTC
Attachment 337050 [details] pushed as da509fd - gunixmounts: Add g_unix_mount_for() support
Comment 7 Ondrej Holy 2016-10-25 07:06:46 UTC
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.
Comment 8 Colin Walters 2016-11-22 18:21:21 UTC
Review of attachment 338382 [details] [review]:

OK.
Comment 9 Colin Walters 2016-11-22 18:21:53 UTC
Attachment 338382 [details] pushed as b626a46 - gunixmounts: Fix crash if path doesn't exist