summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorSean E. Russell <ser@ser1.net>2021-03-04 16:23:04 -0600
committerSean E. Russell <ser@ser1.net>2021-03-04 16:23:04 -0600
commitefcb0e9d2ab8a8f115b5368da03a75974898ed86 (patch)
tree824e37ea8434b91004ba51e533f605ec4314c73b /cmd
parenta44ced4bba471325bba98cabce5709d52c90a60c (diff)
Gets the NVidia extension options working, including marshalling.nvidia
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gotop/main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/gotop/main.go b/cmd/gotop/main.go
index 3a33535..94f03a8 100644
--- a/cmd/gotop/main.go
+++ b/cmd/gotop/main.go
@@ -77,6 +77,7 @@ func parseArgs() error {
opflag.BoolVarP(&conf.Mbps, "mbps", "", conf.Mbps, tr.Value("args.mbps"))
opflag.BoolVar(&conf.Test, "test", conf.Test, tr.Value("args.test"))
opflag.StringP("", "C", "", tr.Value("args.conffile"))
+ opflag.BoolVarP(&conf.Nvidia, "nvidia", "", conf.Nvidia, "Enable NVidia GPU support")
list := opflag.String("list", "", tr.Value("args.list"))
wc := opflag.Bool("write-config", false, tr.Value("args.write"))
opflag.SortFlags = false
@@ -139,6 +140,9 @@ func parseArgs() error {
}
os.Exit(0)
}
+ if conf.Nvidia {
+ conf.ExtensionVars["nvidia"] = "true"
+ }
if *wc {
path, err := conf.Write()
if err != nil {