Commit 36881cde authored by Andrius Štikonas's avatar Andrius Štikonas
Browse files

Fix location of GPT header on 4K LBA devices.

BUG: 453333
parent d247e027
Pipeline #171799 passed with stage
in 3 minutes and 32 seconds
......@@ -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);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment