forked from security/hakurei
internal/wayland: expose WAYLAND_VERSION
This might be useful troubleshooting information. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -11,10 +11,22 @@ import (
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/internal/acl"
|
||||
"hakurei.app/internal/env"
|
||||
"hakurei.app/internal/info"
|
||||
"hakurei.app/internal/system"
|
||||
"hakurei.app/internal/wayland"
|
||||
"hakurei.app/message"
|
||||
)
|
||||
|
||||
// Info returns the address to a populated [hst.Info].
|
||||
//
|
||||
// This must not be called from within package outcome.
|
||||
func Info() *hst.Info {
|
||||
hi := hst.Info{WaylandVersion: wayland.Version,
|
||||
Version: info.Version(), User: new(Hsu).MustID(nil)}
|
||||
env.CopyPaths().Copy(&hi.Paths, hi.User)
|
||||
return &hi
|
||||
}
|
||||
|
||||
// envAllocSize is the initial size of the env map pre-allocated when the configured env map is nil.
|
||||
// It should be large enough to fit all insertions by outcomeOp.toContainer.
|
||||
const envAllocSize = 1 << 6
|
||||
|
||||
Reference in New Issue
Block a user