From c989e7785aa1ca5bf94aef5e096c86ae9af345df Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 14 Aug 2025 19:52:03 +0900 Subject: [PATCH] hst/info: include extra information Signed-off-by: Ophestra --- cmd/hakurei/print.go | 8 ++++++-- hst/info.go | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/hakurei/print.go b/cmd/hakurei/print.go index 105a1e4..ff3ce64 100644 --- a/cmd/hakurei/print.go +++ b/cmd/hakurei/print.go @@ -23,9 +23,9 @@ func printShowSystem(output io.Writer, short, flagJSON bool) { t := newPrinter(output) defer t.MustFlush() - info := new(hst.Info) + info := &hst.Info{Paths: std.Paths()} - // get fid by querying uid of aid 0 + // get hid by querying uid of identity 0 if uid, err := std.Uid(0); err != nil { hlog.PrintBaseError(err, "cannot obtain uid from setuid wrapper:") os.Exit(1) @@ -39,6 +39,10 @@ func printShowSystem(output io.Writer, short, flagJSON bool) { } t.Printf("User:\t%d\n", info.User) + t.Printf("TempDir:\t%s\n", info.TempDir) + t.Printf("SharePath:\t%s\n", info.SharePath) + t.Printf("RuntimePath:\t%s\n", info.RuntimePath) + t.Printf("RunDirPath:\t%s\n", info.RunDirPath) } func printShowInstance( diff --git a/hst/info.go b/hst/info.go index d887cf2..e52f746 100644 --- a/hst/info.go +++ b/hst/info.go @@ -2,4 +2,5 @@ package hst type Info struct { User int `json:"user"` + Paths }