Do coldplug for block devices twice
authorDavid Zeuthen <davidz@redhat.com>
Thu, 26 Jan 2012 16:07:45 +0000 (11:07 -0500)
committerDavid Zeuthen <davidz@redhat.com>
Thu, 26 Jan 2012 16:07:45 +0000 (11:07 -0500)
Otherwise we may miss some associations between LUKS devices and other
block devices. This bug only became evident once we started sorting
block devices before processing them.

Signed-off-by: David Zeuthen <davidz@redhat.com>
src/udiskslinuxprovider.c

index 1dd4db5..ed05b99 100644 (file)
@@ -241,6 +241,8 @@ udisks_linux_provider_start (UDisksProvider *_provider)
   devices = g_list_sort (devices, (GCompareFunc) udev_device_name_cmp);
   for (l = devices; l != NULL; l = l->next)
     udisks_linux_provider_handle_uevent (provider, "add", G_UDEV_DEVICE (l->data));
+  for (l = devices; l != NULL; l = l->next)
+    udisks_linux_provider_handle_uevent (provider, "add", G_UDEV_DEVICE (l->data));
   g_list_foreach (devices, (GFunc) g_object_unref, NULL);
   g_list_free (devices);