Fix drive lookup logic
authorDavid Zeuthen <davidz@redhat.com>
Sat, 13 Aug 2011 16:00:34 +0000 (12:00 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Sat, 13 Aug 2011 16:00:34 +0000 (12:00 -0400)
Signed-off-by: David Zeuthen <davidz@redhat.com>
src/udiskslinuxblock.c

index 75c4368..74fb5a7 100644 (file)
@@ -1263,7 +1263,7 @@ find_drive (GDBusObjectManagerServer  *object_manager,
           const gchar *drive_sysfs_path;
 
           drive_sysfs_path = g_udev_device_get_sysfs_path (drive_device);
-          if (g_str_has_prefix (block_device_sysfs_path, drive_sysfs_path))
+          if (g_strcmp0 (block_device_sysfs_path, drive_sysfs_path) == 0)
             {
               if (out_drive != NULL)
                 *out_drive = udisks_object_get_drive (UDISKS_OBJECT (object));