summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-10-11 19:22:37 +0200
committerLubomir Rintel <lkundrak@v3.sk>2022-10-14 22:19:29 +0200
commitb3a37609be71fd8b26f4e5af15dcf9444c29412b (patch)
tree0da40ea927deef55fa681a61c596b709d615ae0d
parent77508aea59c0d6b826f15d1717b241d2d0121c79 (diff)
nmcli: show sriov capability in "nmcli" outputlr/nmcli-sriov
This is sometimes interesting to know.
-rw-r--r--src/nmcli/general.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nmcli/general.c b/src/nmcli/general.c
index d116ab2c83..54985ce086 100644
--- a/src/nmcli/general.c
+++ b/src/nmcli/general.c
@@ -1301,6 +1301,7 @@ device_overview(NmCli *nmc, NMDevice *device)
GString *outbuf = g_string_sized_new(80);
char *tmp;
const GPtrArray *activatable;
+ NMDeviceCapabilities caps;
activatable = nm_device_get_available_connections(device);
@@ -1378,10 +1379,13 @@ device_overview(NmCli *nmc, NMDevice *device)
break;
}
- if (nm_device_is_software(device))
+ caps = nm_device_get_capabilities(device);
+ if (caps & NM_DEVICE_CAP_IS_SOFTWARE)
g_string_append_printf(outbuf, "%s, ", _("sw"));
else
g_string_append_printf(outbuf, "%s, ", _("hw"));
+ if (caps & NM_DEVICE_CAP_SRIOV)
+ g_string_append_printf(outbuf, "%s, ", _("sriov"));
if (!NM_IN_STRSET(nm_device_get_ip_iface(device), NULL, nm_device_get_iface(device)))
g_string_append_printf(outbuf, "%s %s, ", _("iface"), nm_device_get_ip_iface(device));