pkg/nvme: add NVMe package
This adds a NVMe package for performing various low-level operations on
NVMe devices. Only the most important (to us) calls are implemented as
NVMe has a vast API surface.
Change-Id: I532894c3c2eb780309993a1688226c92c91cdedf
Reviewed-on: https://review.monogon.dev/c/monogon/+/999
Reviewed-by: Mateusz Zalega <mateusz@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/pkg/nvme/cmd_unsupported.go b/metropolis/pkg/nvme/cmd_unsupported.go
new file mode 100644
index 0000000..747a33d
--- /dev/null
+++ b/metropolis/pkg/nvme/cmd_unsupported.go
@@ -0,0 +1,12 @@
+//go:build !linux
+
+package nvme
+
+import (
+ "fmt"
+ "runtime"
+)
+
+func (d *Device) RawCommand(cmd *Command) error {
+ return fmt.Errorf("NVMe command interface unimplemented for %v", runtime.GOOS)
+}