Synthesize 'change' uevent when deleting a partition
authorDavid Zeuthen <davidz@redhat.com>
Mon, 7 Nov 2011 20:16:39 +0000 (15:16 -0500)
committerDavid Zeuthen <davidz@redhat.com>
Mon, 7 Nov 2011 20:22:07 +0000 (15:22 -0500)
Otherwise the udev database is not updated...

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

index 1d8f681..0897eaf 100644 (file)
@@ -642,6 +642,8 @@ handle_delete (UDisksPartition        *partition,
                                              error_message);
       goto out;
     }
+  /* this is sometimes needed because parted(8) does not generate the uevent itself */
+  udisks_linux_block_object_trigger_uevent (UDISKS_LINUX_BLOCK_OBJECT (partition_table_object));
 
   udisks_partition_complete_delete (partition, invocation);