diff options
author | Thomas Haller <thaller@redhat.com> | 2021-04-27 09:51:17 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-05-03 10:11:22 +0200 |
commit | a97c6f70ed194fc33edc2875aec10b9db7c97ac8 (patch) | |
tree | db79cc1fc6c8225e18b4e2f32755cd152bc2a4f4 | |
parent | 3f0812e5046e1f4b6f4b45386b4aa7f0073a1117 (diff) | |
download | NetworkManager-a97c6f70ed194fc33edc2875aec10b9db7c97ac8.tar.gz |
cli: use _pt_gobject_ternary for ternary properties
This accepts more formats, like also yes/on instead of only
true.
-rw-r--r-- | src/libnmc-setting/nm-meta-setting-desc.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/libnmc-setting/nm-meta-setting-desc.c b/src/libnmc-setting/nm-meta-setting-desc.c index 8c4528c2e0..836e76d864 100644 --- a/src/libnmc-setting/nm-meta-setting-desc.c +++ b/src/libnmc-setting/nm-meta-setting-desc.c @@ -4465,7 +4465,6 @@ static const NMMetaPropertyType _pt_gobject_bool = { .complete_fcn = _complete_fcn_gobject_bool, }; -_nm_unused static const NMMetaPropertyType _pt_gobject_ternary = { .get_fcn = _get_fcn_gobject_enum, .set_fcn = _set_fcn_gobject_ternary, @@ -5709,13 +5708,13 @@ static const NMMetaPropertyInfo *const property_infos_HOSTNAME[] = { .property_type = &_pt_gobject_int, ), PROPERTY_INFO (NM_SETTING_HOSTNAME_FROM_DHCP, DESCRIBE_DOC_NM_SETTING_HOSTNAME_FROM_DHCP, - .property_type = &_pt_gobject_enum, + .property_type = &_pt_gobject_ternary, ), PROPERTY_INFO (NM_SETTING_HOSTNAME_FROM_DNS_LOOKUP, DESCRIBE_DOC_NM_SETTING_HOSTNAME_FROM_DNS_LOOKUP, - .property_type = &_pt_gobject_enum, + .property_type = &_pt_gobject_ternary, ), PROPERTY_INFO (NM_SETTING_HOSTNAME_ONLY_FROM_DEFAULT, DESCRIBE_DOC_NM_SETTING_HOSTNAME_ONLY_FROM_DEFAULT, - .property_type = &_pt_gobject_enum, + .property_type = &_pt_gobject_ternary, ), NULL }; @@ -6784,7 +6783,7 @@ static const NMMetaPropertyInfo *const property_infos_SRIOV[] = { ), ), PROPERTY_INFO_WITH_DESC (NM_SETTING_SRIOV_AUTOPROBE_DRIVERS, - .property_type = &_pt_gobject_enum, + .property_type = &_pt_gobject_ternary, ), NULL }; @@ -7512,7 +7511,7 @@ static const NMMetaPropertyInfo *const property_infos_WIRED[] = { .property_type = &_pt_gobject_mac, ), PROPERTY_INFO_WITH_DESC (NM_SETTING_WIRED_ACCEPT_ALL_MAC_ADDRESSES, - .property_type = &_pt_gobject_enum, + .property_type = &_pt_gobject_ternary, ), NULL }; @@ -7543,10 +7542,10 @@ static const NMMetaPropertyInfo *const property_infos_WIREGUARD[] = { .property_type = &_pt_gobject_mtu, ), PROPERTY_INFO_WITH_DESC (NM_SETTING_WIREGUARD_IP4_AUTO_DEFAULT_ROUTE, - .property_type = &_pt_gobject_enum, + .property_type = &_pt_gobject_ternary, ), PROPERTY_INFO_WITH_DESC (NM_SETTING_WIREGUARD_IP6_AUTO_DEFAULT_ROUTE, - .property_type = &_pt_gobject_enum, + .property_type = &_pt_gobject_ternary, ), NULL }; @@ -7680,7 +7679,7 @@ static const NMMetaPropertyInfo *const property_infos_WIRELESS[] = { ), ), PROPERTY_INFO_WITH_DESC (NM_SETTING_WIRELESS_AP_ISOLATION, - .property_type = &_pt_gobject_enum, + .property_type = &_pt_gobject_ternary, ), NULL }; |