about summary refs log tree commit diff
path: root/src/libnm-base/nm-ethtool-base.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2022-11-18 17:48:09 +0100
committerMichael Biebl <biebl@debian.org>2022-11-18 17:48:09 +0100
commit913bcb40f6c699f8a38351c69e7ea263fe78f71f (patch)
tree79508469b79e31338d898459da15070e2a62b049 /src/libnm-base/nm-ethtool-base.c
parent9f101839d9e64df832e9e43c5181887369c46a7e (diff)
New upstream version 1.40.4 upstream/1.40.4
Diffstat (limited to 'src/libnm-base/nm-ethtool-base.c')
-rw-r--r--src/libnm-base/nm-ethtool-base.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libnm-base/nm-ethtool-base.c b/src/libnm-base/nm-ethtool-base.c
index 99bbe68e..78e9fbc1 100644
--- a/src/libnm-base/nm-ethtool-base.c
+++ b/src/libnm-base/nm-ethtool-base.c
@@ -294,3 +294,15 @@ nm_ethtool_id_to_type(NMEthtoolID id)
 
     return NM_ETHTOOL_TYPE_UNKNOWN;
 }
+
+const GVariantType *
+nm_ethtool_id_get_variant_type(NMEthtoolID ethtool_id)
+{
+    if (nm_ethtool_id_is_feature(ethtool_id) || nm_ethtool_id_is_pause(ethtool_id))
+        return G_VARIANT_TYPE_BOOLEAN;
+
+    if (nm_ethtool_id_is_coalesce(ethtool_id) || nm_ethtool_id_is_ring(ethtool_id))
+        return G_VARIANT_TYPE_UINT32;
+
+    return NULL;
+}