[gnome-battery-bench] gbb info: show if pci device is disabled



commit 2d68b35f97d4c1ef1fce27db0cc65584226c5f0f
Author: Christian Kellner <gicmo gnome org>
Date:   Tue Jun 13 18:37:31 2017 +0200

    gbb info: show if pci device is disabled

 src/commandline.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/commandline.c b/src/commandline.c
index 5b74393..29f1308 100644
--- a/src/commandline.c
+++ b/src/commandline.c
@@ -71,6 +71,7 @@ info_txt_pci_device(GbbPciDevice *dev, const char *prefix)
     guint            vendor_id;
     guint            device_id;
     guint            revision;
+    gboolean         enabled;
 
     g_object_get(dev,
                  "vendor", &vendor_id,
@@ -78,15 +79,17 @@ info_txt_pci_device(GbbPciDevice *dev, const char *prefix)
                  "device", &device_id,
                  "device-name", &device_name,
                  "revision", &revision,
+                 "enabled", &enabled,
                  NULL);
 
-    g_print("%s %s [0x%x] (%s [0x%x]) rev. 0x%x\n",
+    g_print("%s %s [0x%x] (%s [0x%x]) rev. 0x%x%s\n",
             prefix,
             device_name != NULL ? device_name : "Unknown",
             device_id,
             vendor_name != NULL ? vendor_name : "Unknown",
             vendor_id,
-            revision);
+            revision,
+            enabled ? "" : " [disabled]");
 }
 
 static int


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]