diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-05 07:49:02 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-05 07:49:02 -0600 |
commit | 68eb7a16b9759646619a7d9dec2b62fa9d0c30cf (patch) | |
tree | 8bb4b70337a299f1dacb3c2858210d4bf6bd4b04 /cmd/btrfs-rec/inspect/rebuildmappings | |
parent | b0f290078d531d2dcb5d34e809b0711ce9b6491e (diff) | |
parent | d7dd6dfd7aeb40f06ff4fbe7f906d8feed64b95f (diff) |
Merge branch 'lukeshu/misc'
Diffstat (limited to 'cmd/btrfs-rec/inspect/rebuildmappings')
-rw-r--r-- | cmd/btrfs-rec/inspect/rebuildmappings/process.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/btrfs-rec/inspect/rebuildmappings/process.go b/cmd/btrfs-rec/inspect/rebuildmappings/process.go index 7a49cc6..2e694b5 100644 --- a/cmd/btrfs-rec/inspect/rebuildmappings/process.go +++ b/cmd/btrfs-rec/inspect/rebuildmappings/process.go @@ -38,7 +38,7 @@ func RebuildMappings(ctx context.Context, fs *btrfs.FS, scanResults ScanDevicesR devIDs := maps.SortedKeys(scanResults) devices := fs.LV.PhysicalVolumes() for _, devID := range devIDs { - if _, ok := devices[devID]; !ok { + if !maps.HasKey(devices, devID) { return fmt.Errorf("device ID %v mentioned in scan results is not part of the filesystem", devID) } devResults := scanResults[devID] |