Re: [libosinfo PATCH 1/3] osinfo-query: Add osinfo_os_list_func to OsinfoLabel

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

 



On 4/15/19 9:58 AM, Fabiano Fidêncio wrote:
Let's add a new osinfo_os_list_func to OsinfoLabel. This function
represents any osinfo_os_get.*_list() and can be used to get Os specific
attributes list.

One example of usage for this is osinfo_os_get_variant_list() and then
be able to also display the os variants when querying for an Os.

https://gitlab.com/libosinfo/libosinfo/issues/24

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
  tools/osinfo-query.c | 64 +++++++++++++++++++++++---------------------
  1 file changed, 33 insertions(+), 31 deletions(-)

diff --git a/tools/osinfo-query.c b/tools/osinfo-query.c
index 00f838b..045f3c1 100644
--- a/tools/osinfo-query.c
+++ b/tools/osinfo-query.c


  static struct OsinfoLabel device_labels[] = {
      { OSINFO_DEVICE_PROP_VENDOR,
-      N_("Vendor"), TRUE, 20 },
+      N_("Vendor"), TRUE, 20, NULL },
      { OSINFO_DEVICE_PROP_VENDOR_ID,
-      N_("Vendor ID"), TRUE, 12 },
+      N_("Vendor ID"), TRUE, 12, NULL },
      { OSINFO_DEVICE_PROP_PRODUCT,
-      N_("Product"), TRUE, 20 },
+      N_("Product"), TRUE, 20 ,NULL },

Incorrect white spacing.

      { OSINFO_DEVICE_PROP_PRODUCT_ID,
-      N_("Product ID"), TRUE, 12 },
+      N_("Product ID"), TRUE, 12, NULL },
      { OSINFO_PRODUCT_PROP_NAME,
-      N_("Name"), TRUE, 14 },
+      N_("Name"), TRUE, 14, NULL },
      { OSINFO_DEVICE_PROP_CLASS,
-      N_("Class"), TRUE, 15 },
+      N_("Class"), TRUE, 15, NULL },
      { OSINFO_DEVICE_PROP_BUS_TYPE,
-      N_("Bus"), TRUE, 8 },
+      N_("Bus"), TRUE, 8, NULL },
      { OSINFO_ENTITY_PROP_ID,
-      N_("ID"), TRUE, 40 },
-    { NULL, NULL, 0, 0 },
+      N_("ID"), TRUE, 40, NULL },
+    { NULL, NULL, 0, 0, NULL },
  };

Michal

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux