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 <[email protected]>
---
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
[email protected]
https://www.redhat.com/mailman/listinfo/libosinfo