cmd/earlyinit: improve error messages

This improves readability, especially on a small display.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-06-28 18:01:51 +09:00
parent d96eecded0
commit cf7c34555c
2 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -26,8 +26,9 @@ var _ report.RepresentableError = ModprobeError{}
func (ModprobeError) Representable() {}
func (e ModprobeError) Error() string {
return fmt.Sprintf(
"modprobe exit status %d: %s",
e.ExitCode, strings.TrimSpace(e.Stderr),
"%s (exit status %d)",
strings.TrimPrefix(strings.TrimSpace(e.Stderr), "modprobe: "),
e.ExitCode,
)
}