summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>2011-09-15 04:25:50 +0300
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>2013-02-18 16:32:25 +0200
commitaef8cb24acc65bf4237f66a923932fcd7df031b7 (patch)
tree409d5d0181baf8525c56caf95b590d485488d8eb
parentb278176379c32800f629b64e6b1f2cad2d8881a4 (diff)
downloadgvfs-aef8cb24acc65bf4237f66a923932fcd7df031b7.tar.gz
gdu,udisks2: Make use of new udev property
New udev/blkid expose more ISO9660 properties, including 'Boot System ID'. Existance of this property implies that media is bootable. The libosinfo udev rules that provided the 'OSINFO_BOOTABLE' property will soon be ditched as a result but we better keep the check for backward compatibility. https://bugzilla.gnome.org/show_bug.cgi?id=694007
-rw-r--r--monitor/gdu/ggdumount.c7
-rw-r--r--monitor/udisks2/gvfsudisks2mount.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/monitor/gdu/ggdumount.c b/monitor/gdu/ggdumount.c
index 9272c3ae..46779c92 100644
--- a/monitor/gdu/ggdumount.c
+++ b/monitor/gdu/ggdumount.c
@@ -1380,7 +1380,12 @@ g_gdu_mount_guess_content_type_sync (GMount *_mount,
gudev_device = g_udev_client_query_by_device_file (client, device_file);
if (gudev_device != NULL)
{
- if (g_udev_device_get_property_as_boolean (gudev_device,
+ const gchar *boot_sys_id;
+
+ boot_sys_id = g_udev_device_get_property (gudev_device,
+ "ID_FS_BOOT_SYSTEM_ID");
+ if (boot_sys_id != NULL ||
+ g_udev_device_get_property_as_boolean (gudev_device,
"OSINFO_BOOTABLE"))
g_ptr_array_add (p, g_strdup ("x-content/bootable-media"));
diff --git a/monitor/udisks2/gvfsudisks2mount.c b/monitor/udisks2/gvfsudisks2mount.c
index f19f3abe..dd00db48 100644
--- a/monitor/udisks2/gvfsudisks2mount.c
+++ b/monitor/udisks2/gvfsudisks2mount.c
@@ -1240,7 +1240,12 @@ gvfs_udisks2_mount_guess_content_type_sync (GMount *_mount,
if (gudev_device != NULL)
{
/* Check if its bootable */
- if (g_udev_device_get_property_as_boolean (gudev_device, "OSINFO_BOOTABLE"))
+ const gchar *boot_sys_id;
+
+ boot_sys_id = g_udev_device_get_property (gudev_device,
+ "ID_FS_BOOT_SYSTEM_ID");
+ if (boot_sys_id != NULL ||
+ g_udev_device_get_property_as_boolean (gudev_device, "OSINFO_BOOTABLE"))
g_ptr_array_add (p, g_strdup ("x-content/bootable-media"));
/* Check for media player */