disk: remove RootPartitionIndex

This method was only used by `updateRootPartition` which got
removed as well so this method is unused now.
This commit is contained in:
Christian Kellner 2021-11-09 15:44:29 +00:00 committed by Tom Gundersen
parent fb7f92aa95
commit 74f6c59c93

View file

@ -176,19 +176,6 @@ func (pt *PartitionTable) BootPartitionIndex() int {
return rootIdx
}
func (pt *PartitionTable) RootPartitionIndex() int {
rootIdx := -1
for idx, part := range pt.Partitions {
if part.Filesystem == nil {
continue
}
if part.Filesystem.Mountpoint == "/" {
rootIdx = idx
}
}
return rootIdx
}
// Returns the Filesystem instance for a given mountpoint, if it exists.
func (pt *PartitionTable) FindFilesystemForMountpoint(mountpoint string) *Filesystem {
for _, part := range pt.Partitions {