Merge branch 'sfdisk' into kauth
This commit is contained in:
commit
a6a69b1e31
|
@ -31,6 +31,7 @@ SfdiskDevice::SfdiskDevice(const Device& d) :
|
||||||
|
|
||||||
SfdiskDevice::~SfdiskDevice()
|
SfdiskDevice::~SfdiskDevice()
|
||||||
{
|
{
|
||||||
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SfdiskDevice::open()
|
bool SfdiskDevice::open()
|
||||||
|
@ -50,19 +51,16 @@ bool SfdiskDevice::close()
|
||||||
if (isExclusive())
|
if (isExclusive())
|
||||||
setExclusive(false);
|
setExclusive(false);
|
||||||
|
|
||||||
|
CoreBackendPartitionTable* ptable = new SfdiskPartitionTable(m_device);
|
||||||
|
ptable->commit();
|
||||||
|
delete ptable;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreBackendPartitionTable* SfdiskDevice::openPartitionTable()
|
CoreBackendPartitionTable* SfdiskDevice::openPartitionTable()
|
||||||
{
|
{
|
||||||
CoreBackendPartitionTable* ptable = new SfdiskPartitionTable(m_device);
|
return new SfdiskPartitionTable(m_device);
|
||||||
|
|
||||||
if (ptable == nullptr || !ptable->open()) {
|
|
||||||
delete ptable;
|
|
||||||
ptable = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ptable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SfdiskDevice::createPartitionTable(Report& report, const PartitionTable& ptable)
|
bool SfdiskDevice::createPartitionTable(Report& report, const PartitionTable& ptable)
|
||||||
|
|
|
@ -165,6 +165,7 @@ static struct {
|
||||||
{ FileSystem::Ext3, { QLatin1String("0FC63DAF-8483-4772-8E79-3D69D8477DE4"), QLatin1String("83") } },
|
{ FileSystem::Ext3, { QLatin1String("0FC63DAF-8483-4772-8E79-3D69D8477DE4"), QLatin1String("83") } },
|
||||||
{ FileSystem::Ext4, { 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::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::Fat16, { QLatin1String("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), QLatin1String("6") } },
|
||||||
{ FileSystem::Fat32, { QLatin1String("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), QLatin1String("7") } },
|
{ FileSystem::Fat32, { QLatin1String("EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"), QLatin1String("7") } },
|
||||||
{ FileSystem::Nilfs2, { QLatin1String("0FC63DAF-8483-4772-8E79-3D69D8477DE4"), QLatin1String("83") } },
|
{ FileSystem::Nilfs2, { QLatin1String("0FC63DAF-8483-4772-8E79-3D69D8477DE4"), QLatin1String("83") } },
|
||||||
|
|
Loading…
Reference in New Issue