Use BLKPG_DEL_PARTITION when deleting partitions instead of libparted
authorDavid Zeuthen <davidz@redhat.com>
Sat, 31 Oct 2009 16:38:02 +0000 (12:38 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Sat, 31 Oct 2009 16:38:02 +0000 (12:38 -0400)
commit8f39afda2aa0f31a7113e97dd1561f5659c3ef22
tree7053f1b47d10fa9b67dd8fcd87bad3d0d309b3e3
parent5a1e919e6692952b2e6384bb45ffb1d1c64af7b7
Use BLKPG_DEL_PARTITION when deleting partitions instead of libparted

Sadly, libparted gets this wrong since it does the equivalent of
'blockdev --rereadpt' which fails if one or more partitions are busy.

Also disallow deleting an extended partition if logical partitions
exist. We can undo this if we add some code to also do DEL_PARTITION
for the logical partitions (including scrubbing signatures).
src/devkit-disks-device.c
src/job-delete-partition.c