コード例 #1
0
ファイル: KPMHelpers.cpp プロジェクト: AOSC-Dev/calamares
Partition*
clonePartition( Device* device, Partition* partition )
{
    FileSystem* fs = FileSystemFactory::create(
                         partition->fileSystem().type(),
                         partition->firstSector(),
                         partition->lastSector()
                     );
    return new Partition(
               partition->parent(),
               *device,
               partition->roles(),
               fs, fs->firstSector(), fs->lastSector(),
               partition->partitionPath()
                );
}
コード例 #2
0
ファイル: KPMHelpers.cpp プロジェクト: AOSC-Dev/calamares
Partition*
createNewPartition( PartitionNode* parent, const Device& device, const PartitionRole& role, FileSystem::Type fsType, qint64 firstSector, qint64 lastSector )
{
    FileSystem* fs = FileSystemFactory::create( fsType, firstSector, lastSector );
    return new Partition(
               parent,
               device,
               role,
               fs, fs->firstSector(), fs->lastSector(),
               QString() /* path */,
               PartitionTable::FlagNone /* availableFlags */,
               QString() /* mountPoint */,
               false /* mounted */,
               PartitionTable::FlagNone /* activeFlags */,
               Partition::StateNew
           );
}