mirror of
https://github.com/altlinux/ALTMediaWriter.git
synced 2025-02-22 05:57:44 +03:00
Fix restore on Linux with latest UDisks/libblockdev (#647)
The newly created partition cannot start on offset 0, previously UDisks was able to compensate for this, but there is a bug in the latest UDisks/libblockdev and this no longer works. But in general offset 0 for a new partition doesn't make sense. We can also use 0 for size to let UDisks calculate the maximal size instead of passing the underlying device size. Fixes: #644
This commit is contained in:
parent
a1699b6748
commit
2b5ce77d20
@ -77,7 +77,7 @@ void RestoreJob::work() {
|
||||
}
|
||||
|
||||
QDBusInterface partitionTable("org.freedesktop.UDisks2", where, "org.freedesktop.UDisks2.PartitionTable", QDBusConnection::systemBus(), this);
|
||||
QDBusReply<QDBusObjectPath> partitionReply = partitionTable.call("CreatePartition", 0ULL, device.property("Size").toULongLong(), "", "", Properties());
|
||||
QDBusReply<QDBusObjectPath> partitionReply = partitionTable.call("CreatePartition", 1ULL, 0ULL, "", "", Properties());
|
||||
if (!partitionReply.isValid()) {
|
||||
err << partitionReply.error().message();
|
||||
err.flush();
|
||||
|
Loading…
x
Reference in New Issue
Block a user