aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/earlyinit/main.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-06-28 18:01:51 +0900
committerOphestra <cat@gensokyo.uk>2026-06-28 18:01:51 +0900
commitcf7c34555c8df07d9baf582c65a9e88d1605e075 (patch)
tree34d83229ad61bc5f3f1316f516aba67349449677 /cmd/earlyinit/main.go
parentd96eecded0964d3bb5ff5db369740fe9663c1d8b (diff)
cmd/earlyinit: improve error messages
This improves readability, especially on a small display. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/earlyinit/main.go')
-rw-r--r--cmd/earlyinit/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/earlyinit/main.go b/cmd/earlyinit/main.go
index d1652e5f..987faeab 100644
--- a/cmd/earlyinit/main.go
+++ b/cmd/earlyinit/main.go
@@ -7,6 +7,7 @@ package main
import (
"context"
"crypto/rand"
+ "io"
"log"
"os"
"os/signal"
@@ -51,13 +52,14 @@ func init() {
func fatal(v ...any) {
log.Println(v...)
log.Println("unable to continue, please reboot and resolve the problem manually")
+ log.SetOutput(io.Discard)
select {}
}
// must calls fatal with err if it is non-nil.
func must(err error) {
if err != nil {
- log.Println(err)
+ fatal(err)
select {}
}
}