diff options
| author | Michael Biebl <biebl@debian.org> | 2022-11-18 17:49:21 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-11-18 17:49:21 +0100 |
| commit | 35b6136bc39c77da74de1325e13871bc985c5352 (patch) | |
| tree | f5d91944aa7b1df3b4cf397e617e9af9cfea89cf /src/libnm-base | |
| parent | c9f38062acbf43edb3b33c336ba19a449664c3de (diff) | |
| parent | 913bcb40f6c699f8a38351c69e7ea263fe78f71f (diff) | |
Update upstream source from tag 'upstream/1.40.4'
Update to upstream version '1.40.4' with Debian dir 7084cdfc71b038bf79ea5f3c53dfea86e49c80cb
Diffstat (limited to 'src/libnm-base')
| -rw-r--r-- | src/libnm-base/nm-ethtool-base.c | 12 | ||||
| -rw-r--r-- | src/libnm-base/nm-ethtool-base.h | 2 |
2 files changed, 14 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; +} diff --git a/src/libnm-base/nm-ethtool-base.h b/src/libnm-base/nm-ethtool-base.h index abedcafe..22bb88fb 100644 --- a/src/libnm-base/nm-ethtool-base.h +++ b/src/libnm-base/nm-ethtool-base.h @@ -21,6 +21,8 @@ const NMEthtoolData *nm_ethtool_data_get_by_optname(const char *optname); NMEthtoolType nm_ethtool_id_to_type(NMEthtoolID id); +const GVariantType *nm_ethtool_id_get_variant_type(NMEthtoolID ethtool_id); + /****************************************************************************/ static inline NMEthtoolID |