Add NVMe block format tool

This commit is contained in:
Mikhail Chusavitin
2026-04-30 16:27:25 +03:00
parent 8a21809ade
commit 7ce73e34a4
8 changed files with 408 additions and 0 deletions

View File

@@ -376,6 +376,12 @@ func executeTaskWithOptions(opts *HandlerOptions, t *Task, j *jobState, ctx cont
break
}
err = a.RunInstallToRAM(ctx, j.append)
case "nvme-format":
if strings.TrimSpace(t.params.Device) == "" {
err = fmt.Errorf("device is required")
break
}
err = runNVMeFormatTask(ctx, j, t.params.Device, t.params.LBAF)
default:
j.append("ERROR: unknown target: " + t.Target)
j.finish("unknown target")