openMSX
Functions
openmsx::DiskImageUtils Namespace Reference

Functions

void checkValidPartition (SectorAccessibleDisk &disk, unsigned partition)
 Checks whether the disk is partitioned the specified partition exists throws a CommandException if one of these conditions is false. More...
 
void checkFAT12Partition (SectorAccessibleDisk &disk, unsigned partition)
 Like above, but also check whether partition is of type FAT12. More...
 
bool hasPartitionTable (SectorAccessibleDisk &disk)
 Check whether the given disk is partitioned. More...
 
void format (SectorAccessibleDisk &disk, bool dos1=false)
 Format the given disk (= a single partition). More...
 
void partition (SectorAccessibleDisk &disk, const std::vector< unsigned > &sizes)
 Write a partition table to the given disk and format each partition. More...
 

Function Documentation

◆ checkFAT12Partition()

void openmsx::DiskImageUtils::checkFAT12Partition ( SectorAccessibleDisk disk,
unsigned  partition 
)

Like above, but also check whether partition is of type FAT12.

Definition at line 57 of file DiskImageUtils.cc.

◆ checkValidPartition()

void openmsx::DiskImageUtils::checkValidPartition ( SectorAccessibleDisk disk,
unsigned  partition 
)

Checks whether the disk is partitioned the specified partition exists throws a CommandException if one of these conditions is false.

Parameters
diskThe disk to check.
partitionPartition number, in range [1..31].

Definition at line 51 of file DiskImageUtils.cc.

◆ format()

void openmsx::DiskImageUtils::format ( SectorAccessibleDisk disk,
bool  dos1 = false 
)

Format the given disk (= a single partition).

The formatting depends on the size of the image.

Parameters
diskthe disk/partition image to be formatted
dos1set to true if you want to force dos1 formatting (boot sector)

Definition at line 182 of file DiskImageUtils.cc.

◆ hasPartitionTable()

bool openmsx::DiskImageUtils::hasPartitionTable ( SectorAccessibleDisk disk)

Check whether the given disk is partitioned.

Definition at line 21 of file DiskImageUtils.cc.

◆ partition()

void openmsx::DiskImageUtils::partition ( SectorAccessibleDisk disk,
const std::vector< unsigned > &  sizes 
)

Write a partition table to the given disk and format each partition.

Parameters
diskThe disk to partition.
sizesThe number of sectors for each partition.

Definition at line 225 of file DiskImageUtils.cc.