disk: create{Partition -> Filesystem}

What this function is actually doing is to create a filesystem,
together with a new partition; for LVM that filesystem could
also be created on a new logical volume though.
This commit is contained in:
Christian Kellner 2021-11-09 15:44:29 +00:00 committed by Tom Gundersen
parent 5693045916
commit d415d57f95

View file

@ -40,7 +40,7 @@ func CreatePartitionTable(
for _, m := range mountpoints {
if m.Mountpoint != "/" {
partitionSize := m.MinSize / sectorSize
basePartitionTable.createPartition(m.Mountpoint, partitionSize, rng)
basePartitionTable.createFilesystem(m.Mountpoint, partitionSize, rng)
}
}
@ -63,7 +63,7 @@ func CreatePartitionTable(
return basePartitionTable
}
func (pt *PartitionTable) createPartition(mountpoint string, size uint64, rng *rand.Rand) {
func (pt *PartitionTable) createFilesystem(mountpoint string, size uint64, rng *rand.Rand) {
filesystem := Filesystem{
Type: "xfs",
UUID: uuid.Must(newRandomUUIDFromReader(rng)).String(),