Merge branch 'sfdisk' into kauth

This commit is contained in:
Andrius Štikonas 2017-12-25 00:13:18 +00:00
commit a6a69b1e31
2 changed files with 7 additions and 8 deletions

View File

@ -31,6 +31,7 @@ SfdiskDevice::SfdiskDevice(const Device& d) :
SfdiskDevice::~SfdiskDevice()
{
close();
}
bool SfdiskDevice::open()
@ -50,19 +51,16 @@ bool SfdiskDevice::close()
if (isExclusive())
setExclusive(false);
CoreBackendPartitionTable* ptable = new SfdiskPartitionTable(m_device);
ptable->commit();
delete ptable;
return true;
}
CoreBackendPartitionTable* SfdiskDevice::openPartitionTable()
{
CoreBackendPartitionTable* ptable = new SfdiskPartitionTable(m_device);
if (ptable == nullptr || !ptable->open()) {
delete ptable;
ptable = nullptr;
}
return ptable;
return new SfdiskPartitionTable(m_device);
}
bool SfdiskDevice::createPartitionTable(Report& report, const PartitionTable& ptable)

View File

@ -165,6 +165,7 @@ static struct {
{ FileSystem::Ext3, { QLatin1String("0FC63DAF-8483-4772-8E79-3D69D8477DE4"), QLatin1String("83") } },
{ FileSystem::Ext4, { QLatin1String("0FC63DAF-8483-4772-8E79-3D69D8477DE4"), QLatin1String("83") } },
{ FileSystem::LinuxSwap, { QLatin1String("0657FD6D-A4AB-43C4-84E5-0933C84B4F4F"), QLatin1String("82") } },
{ FileSystem::Fat12, { QLatin1String("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), QLatin1String("6") } },
{ FileSystem::Fat16, { QLatin1String("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), QLatin1String("6") } },
{ FileSystem::Fat32, { QLatin1String("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), QLatin1String("7") } },
{ FileSystem::Nilfs2, { QLatin1String("0FC63DAF-8483-4772-8E79-3D69D8477DE4"), QLatin1String("83") } },