aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-14 19:52:03 +0900
committerOphestra <cat@gensokyo.uk>2025-08-14 19:52:03 +0900
commitc989e7785aa1ca5bf94aef5e096c86ae9af345df (patch)
treed7557ab6f9bb0977206d2d90a4d74d4b6347af8f
parent332d90d6c77ff6c8204f84e5213f8a1f9dc44745 (diff)
hst/info: include extra information
Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--cmd/hakurei/print.go8
-rw-r--r--hst/info.go1
2 files changed, 7 insertions, 2 deletions
diff --git a/cmd/hakurei/print.go b/cmd/hakurei/print.go
index 105a1e4f..ff3ce645 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 d887cf2f..e52f7465 100644
--- a/hst/info.go
+++ b/hst/info.go
@@ -2,4 +2,5 @@ package hst
type Info struct {
User int `json:"user"`
+ Paths
}