disk: remove updateRootPartition
The previous commit made sure that `PartitionTable.RootPartition` is indeed returning the pointer partition object inside the array of the `PartitionTable`. Thus changes to the returned object will now directly affect the object and thus there is no need to call `PartitionTable.updateRootPartition` anymore.
This commit is contained in:
parent
6333d54091
commit
147e0c966b
2 changed files with 0 additions and 5 deletions
|
|
@ -60,7 +60,6 @@ func CreatePartitionTable(
|
|||
rootPartition := basePartitionTable.RootPartition()
|
||||
rootPartition.Size = ((imageSize / sectorSize) - start - 100)
|
||||
rootPartition.Filesystem.UUID = uuid.Must(newRandomUUIDFromReader(rng)).String()
|
||||
basePartitionTable.updateRootPartition(*rootPartition)
|
||||
|
||||
return basePartitionTable
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,10 +214,6 @@ func (pt *PartitionTable) updatePartitionStartPointOffsets(start uint64) uint64
|
|||
return start
|
||||
}
|
||||
|
||||
func (pt *PartitionTable) updateRootPartition(rootPartition Partition) {
|
||||
pt.Partitions[pt.RootPartitionIndex()] = rootPartition
|
||||
}
|
||||
|
||||
func (pt *PartitionTable) getPartitionTableSize() uint64 {
|
||||
var size uint64
|
||||
for _, p := range pt.Partitions {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue