treewide: add missing error handling
Change-Id: I55ccf3ff490b58f6af93e665c668428acddc8d65
Reviewed-on: https://review.monogon.dev/c/monogon/+/3019
Vouch-Run-CI: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/metropolis/installer/main.go b/metropolis/installer/main.go
index 6313548..a35a734 100644
--- a/metropolis/installer/main.go
+++ b/metropolis/installer/main.go
@@ -89,6 +89,9 @@
// Use the partition's name to find and return the name of its parent
// device. It will be excluded from the list of suitable target devices.
srcDev, err := sysfs.ParentBlockDevice(espDev)
+ if err != nil{
+ return nil, fmt.Errorf("failed to fetch parent device: %w", err)
+ }
// Build the exclusion list containing forbidden handle prefixes.
exclude := []string{"dm-", "zram", "ram", "loop", srcDev}