Skip to content

Commit f5dfe17

Browse files
committed
contrib/fs-idmap: Dont use log, just print to stderr
Now that all the code is one function, we only print twice to stderr. Is simpler to just print to stderr instead of logging and having also the timestamp (that we can remove, but it is still more work to do). Signed-off-by: Rodrigo Campos <[email protected]>
1 parent 65859c2 commit f5dfe17

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

contrib/cmd/fs-idmap/fs-idmap.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
"fmt"
5-
"log"
65
"os"
76
"os/exec"
87
"syscall"
@@ -12,11 +11,13 @@ import (
1211

1312
func main() {
1413
if len(os.Args) != 2 {
15-
log.Fatalf("usage: %s path_to_mount_set_attr", os.Args[0])
14+
fmt.Fprintln(os.Stderr, "usage:", os.Args[0], "path_to_mount_set_attr")
15+
os.Exit(1)
1616
}
1717
src := os.Args[1]
1818
if err := supportsIDMap(src); err != nil {
19-
log.Fatalf("fatal error: %v", err)
19+
fmt.Fprintln(os.Stderr, "fatal error:", err)
20+
os.Exit(1)
2021
}
2122
}
2223

0 commit comments

Comments
 (0)