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 772894 - g_volume_monitor_get_volume_for_uuid not working
g_volume_monitor_get_volume_for_uuid not working
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: udisks2 volume monitor
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
: 686798 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-10-13 21:50 UTC by William Fraser
Modified: 2016-11-10 08:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
udisks2: Add support for uuid (2.55 KB, patch)
2016-10-17 14:26 UTC, Ondrej Holy
committed Details | Review

Description William Fraser 2016-10-13 21:50:11 UTC
Not sure where to post as it's a fault with the core GIO, but can't find that in BugZilla anywhere, gvfs is only place I can find that references it.

The problem relates to g_volume_monitor_get_volume_for_uuid() in GVolumeMonitor and g_volume_get_uuid() in GVolume.

g_volume_get_uuid() in GVolume returns NULL even though g_volume_get_identifier(volume, "uuid") returns the character string of the UUID.

g_volume_monitor_get_volume_for_uuid() in GVolumeMonitor won't return a volume even if passed the UUID of a valid, connected volume.

I'm using GTK version 2
Comment 1 Ondrej Holy 2016-10-14 11:47:24 UTC
Thanks for your bug report! You are right, volume->uuid is not set by udisks2 volume monitor...
Comment 2 Ondrej Holy 2016-10-17 14:26:03 UTC
Created attachment 337860 [details] [review]
udisks2: Add support for uuid

gvfs_udisks2_volume_get_uuid returns NULL regardless of the output
from udisks_block_get_id_uuid currently. Set volume->uuid property
and handle its changes properly.
Comment 3 Ondrej Holy 2016-11-10 08:43:59 UTC
Attachment 337860 [details] pushed as c5cbb90 - udisks2: Add support for uuid
Comment 4 Ondrej Holy 2016-11-10 08:45:49 UTC
*** Bug 686798 has been marked as a duplicate of this bug. ***