mirror of
https://github.com/containers/podman.git
synced 2025-06-22 01:48:54 +08:00
Merge pull request #1793 from vrothberg/rootless-info
info: add rootless field
This commit is contained in:
@ -12,6 +12,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/containers/libpod/pkg/rootless"
|
||||||
"github.com/containers/libpod/utils"
|
"github.com/containers/libpod/utils"
|
||||||
"github.com/containers/storage/pkg/system"
|
"github.com/containers/storage/pkg/system"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@ -30,6 +31,7 @@ func (r *Runtime) hostInfo() (map[string]interface{}, error) {
|
|||||||
info["os"] = runtime.GOOS
|
info["os"] = runtime.GOOS
|
||||||
info["arch"] = runtime.GOARCH
|
info["arch"] = runtime.GOARCH
|
||||||
info["cpus"] = runtime.NumCPU()
|
info["cpus"] = runtime.NumCPU()
|
||||||
|
info["rootless"] = rootless.IsRootless()
|
||||||
mi, err := system.ReadMemInfo()
|
mi, err := system.ReadMemInfo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrapf(err, "error reading memory info")
|
return nil, errors.Wrapf(err, "error reading memory info")
|
||||||
|
Reference in New Issue
Block a user