in internal/diskutil/mojave.go [12:32]
func updatePhysicalStores(partitions *types.SystemPartitions) error {
// Independently update all APFS disks' physical stores
for i, part := range partitions.AllDisksAndPartitions {
// Only do the update if the disk/partition is APFS
if isAPFSVolume(part) {
// Fetch the physical store for the disk/partition
physicalStoreId, err := fetchPhysicalStore(part.DeviceIdentifier)
if err != nil {
return err
}
// Create a new physical store from the output
physicalStore := types.APFSPhysicalStoreID{physicalStoreId}
// Add the physical store to the DiskInfo
partitions.AllDisksAndPartitions[i].APFSPhysicalStores = append(part.APFSPhysicalStores, physicalStore)
}
}
return nil
}