Fix location of GPT header on 4K LBA devices.
BUG: 453333
This commit is contained in:
parent
d247e027a1
commit
36881cde62
|
@ -451,7 +451,8 @@ bool SfdiskBackend::updateDevicePartitionTable(Device &d, const QJsonObject &jso
|
|||
// Read the maximum number of GPT partitions
|
||||
qint32 maxEntries;
|
||||
QByteArray gptHeader;
|
||||
CopySourceDevice source(d, 512, 1023);
|
||||
qint64 sectorSize = d.logicalSize();
|
||||
CopySourceDevice source(d, sectorSize, sectorSize * 2 - 1);
|
||||
|
||||
ExternalCommand readCmd;
|
||||
gptHeader = readCmd.readData(source);
|
||||
|
|
Loading…
Reference in New Issue