From 2ccbf8af3b19a0ea252cf983bed0d899ecaba547 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 29 Aug 2022 15:05:39 +0200 Subject: libnm: style cleanups for property annotations The parser will become stricter, and expect certain things. The strictness should help, to avoid writing wrong annotations. Adjust for that. --- src/libnm-core-impl/nm-setting-bridge.c | 3 ++- src/libnm-core-impl/nm-setting-infiniband.c | 3 ++- src/libnm-core-impl/nm-setting-ip4-config.c | 12 ++++++++---- src/libnm-core-impl/nm-setting-ip6-config.c | 12 ++++++++---- src/libnm-core-impl/nm-setting-serial.c | 3 ++- src/libnm-core-impl/nm-setting-tc-config.c | 4 ++-- src/libnm-core-impl/nm-setting-vlan.c | 3 ++- src/libnm-core-impl/nm-setting-wired.c | 12 ++++++++---- src/libnm-core-impl/nm-setting-wireless.c | 18 ++++++++++++------ 9 files changed, 46 insertions(+), 24 deletions(-) diff --git a/src/libnm-core-impl/nm-setting-bridge.c b/src/libnm-core-impl/nm-setting-bridge.c index 39a3fb6017..017b8e860e 100644 --- a/src/libnm-core-impl/nm-setting-bridge.c +++ b/src/libnm-core-impl/nm-setting-bridge.c @@ -1439,7 +1439,8 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass) * example: mac-address=00:22:68:12:79:A2 * mac-address=0;34;104;18;121;162; * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: mac-address * variable: BRIDGE_MACADDR(+) * description: MAC address of the bridge. Note that this requires a recent diff --git a/src/libnm-core-impl/nm-setting-infiniband.c b/src/libnm-core-impl/nm-setting-infiniband.c index 787b838b76..410f1f0687 100644 --- a/src/libnm-core-impl/nm-setting-infiniband.c +++ b/src/libnm-core-impl/nm-setting-infiniband.c @@ -378,7 +378,8 @@ nm_setting_infiniband_class_init(NMSettingInfinibandClass *klass) * or semicolon separated list of 20 decimal bytes (obsolete) * example: mac-address= 80:00:00:6d:fe:80:00:00:00:00:00:00:00:02:55:00:70:33:cf:01 * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: mac-address * variable: HWADDR * description: IBoIP 20-byte hardware address of the device (in traditional diff --git a/src/libnm-core-impl/nm-setting-ip4-config.c b/src/libnm-core-impl/nm-setting-ip4-config.c index ff56834e1a..a8f5d611df 100644 --- a/src/libnm-core-impl/nm-setting-ip4-config.c +++ b/src/libnm-core-impl/nm-setting-ip4-config.c @@ -637,7 +637,8 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass) * description: List of DNS servers. * example: dns=1.2.3.4;8.8.8.8;8.8.4.4; * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: dns * variable: DNS1, DNS2, ... * format: string @@ -662,7 +663,8 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass) * description: List of static IP addresses. * example: address1=192.168.100.100/24 address2=10.1.1.5/24 * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: addresses * variable: IPADDR, PREFIX (NETMASK), IPADDR1, PREFIX1 (NETMASK1), ... * description: List of static IP addresses. @@ -677,7 +679,8 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass) * description: Gateway IP addresses as a string. * example: gateway=192.168.100.1 * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: gateway * variable: GATEWAY * description: Gateway IP address. @@ -693,7 +696,8 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass) * example: route1=8.8.8.0/24,10.1.1.1,77 * route2=7.7.0.0/16 * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: routes * variable: ADDRESS1, NETMASK1, GATEWAY1, METRIC1, OPTIONS1, ... * description: List of static routes. They are not stored in ifcfg-* file, diff --git a/src/libnm-core-impl/nm-setting-ip6-config.c b/src/libnm-core-impl/nm-setting-ip6-config.c index f4e62c2304..83c7e9dc6c 100644 --- a/src/libnm-core-impl/nm-setting-ip6-config.c +++ b/src/libnm-core-impl/nm-setting-ip6-config.c @@ -576,7 +576,8 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass) * description: List of DNS servers. * example: dns=2001:4860:4860::8888;2001:4860:4860::8844; * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: dns * variable: DNS1, DNS2, ... * format: string @@ -600,7 +601,8 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass) * description: List of static IP addresses. * example: address1=abbe::cafe/96 address2=2001::1234 * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: addresses * variable: IPV6ADDR, IPV6ADDR_SECONDARIES * description: List of static IP addresses. @@ -616,7 +618,8 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass) * description: Gateway IP addresses as a string. * example: gateway=abbe::1 * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: gateway * variable: IPV6_DEFAULTGW * description: Gateway IP address. @@ -631,7 +634,8 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass) * description: List of IP routes. * example: route1=2001:4860:4860::/64,2620:52:0:2219:222:68ff:fe11:5403 * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: routes * variable: (none) * description: List of static routes. They are not stored in ifcfg-* file, diff --git a/src/libnm-core-impl/nm-setting-serial.c b/src/libnm-core-impl/nm-setting-serial.c index a820187630..6fe3e487d1 100644 --- a/src/libnm-core-impl/nm-setting-serial.c +++ b/src/libnm-core-impl/nm-setting-serial.c @@ -278,7 +278,8 @@ nm_setting_serial_class_init(NMSettingSerialClass *klass) * 111 ('o') for odd, or 110 ('n') for none. * example: parity=n * ---end--- - * ---dbus--- + */ + /* ---dbus--- * property: parity * format: byte * description: The connection parity: 69 (ASCII 'E') for even parity, diff --git a/src/libnm-core-impl/nm-setting-tc-config.c b/src/libnm-core-impl/nm-setting-tc-config.c index 24dfe0417c..ab7f2533c4 100644 --- a/src/libnm-core-impl/nm-setting-tc-config.c +++ b/src/libnm-core-impl/nm-setting-tc-config.c @@ -2107,8 +2107,8 @@ nm_setting_tc_config_class_init(NMSettingTCConfigClass *klass) * format: GPtrArray(NMTCTfilter) * description-docbook: * - * Array of TC traffic filters. Traffic control can manage the packet content during - * classification by using filters. + * Array of TC traffic filters. Traffic control can manage the packet content during + * classification by using filters. * * * Each tfilters can be specified by the following attributes: diff --git a/src/libnm-core-impl/nm-setting-vlan.c b/src/libnm-core-impl/nm-setting-vlan.c index 5f50acdde8..288945271b 100644 --- a/src/libnm-core-impl/nm-setting-vlan.c +++ b/src/libnm-core-impl/nm-setting-vlan.c @@ -965,7 +965,8 @@ nm_setting_vlan_class_init(NMSettingVlanClass *klass) * but VLAN id from DEVICE takes precedence over VLAN_ID. * example: PHYSDEV=eth0, VLAN_ID=12; or DEVICE=eth0.12 * ---end--- - * ---dbus--- + */ + /* ---dbus--- * property: interface-name * format: string * description: Deprecated in favor of connection.interface-name, but can diff --git a/src/libnm-core-impl/nm-setting-wired.c b/src/libnm-core-impl/nm-setting-wired.c index 830b2c7328..947ffe6ff2 100644 --- a/src/libnm-core-impl/nm-setting-wired.c +++ b/src/libnm-core-impl/nm-setting-wired.c @@ -1311,7 +1311,8 @@ nm_setting_wired_class_init(NMSettingWiredClass *klass) * (e.g. 00:22:68:12:79:A2), or semicolon separated list of 6 bytes (obsolete) * (e.g. 0;34;104;18;121;162) * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: mac-address * variable: HWADDR * description: Hardware address of the device in traditional hex-digits-and-colons @@ -1359,13 +1360,15 @@ nm_setting_wired_class_init(NMSettingWiredClass *klass) * (e.g. 00:22:68:12:79:B2), or semicolon separated list of 6 bytes (obsolete) * (e.g. 0;34;104;18;121;178). * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: cloned-mac-address * variable: MACADDR * description: Cloned (spoofed) MAC address in traditional hex-digits-and-colons * notation (e.g. 00:22:68:14:5A:99). * ---end--- - * ---dbus--- + */ + /* ---dbus--- * property: cloned-mac-address * format: byte array * description: This D-Bus field is deprecated in favor of "assigned-mac-address" @@ -1465,7 +1468,8 @@ nm_setting_wired_class_init(NMSettingWiredClass *klass) * description: MAC address blacklist. * example: mac-address-blacklist= 00:22:68:12:79:A6;00:22:68:12:79:78 * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: mac-address-blacklist * variable: HWADDR_BLACKLIST(+) * description: It denies usage of the connection for any device whose address diff --git a/src/libnm-core-impl/nm-setting-wireless.c b/src/libnm-core-impl/nm-setting-wireless.c index cf391598a4..6bfcd2ce91 100644 --- a/src/libnm-core-impl/nm-setting-wireless.c +++ b/src/libnm-core-impl/nm-setting-wireless.c @@ -1311,7 +1311,8 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass) * description: SSID of Wi-Fi network. * example: ssid=Quick Net * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: ssid * variable: ESSID * description: SSID of Wi-Fi network. @@ -1493,7 +1494,8 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass) * (e.g. 00:22:68:12:79:A2), or semicolon separated list of 6 bytes (obsolete) * (e.g. 0;34;104;18;121;162). * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: mac-address * variable: HWADDR * description: Hardware address of the device in traditional hex-digits-and-colons @@ -1540,13 +1542,15 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass) * (e.g. 00:22:68:12:79:B2), or semicolon separated list of 6 bytes (obsolete) * (e.g. 0;34;104;18;121;178). * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: cloned-mac-address * variable: MACADDR * description: Cloned (spoofed) MAC address in traditional hex-digits-and-colons * notation (e.g. 00:22:68:14:5A:99). * ---end--- - * ---dbus--- + */ + /* ---dbus--- * property: cloned-mac-address * format: byte array * description: This D-Bus field is deprecated in favor of "assigned-mac-address" @@ -1645,7 +1649,8 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass) * description: MAC address blacklist. * example: mac-address-blacklist= 00:22:68:12:79:A6;00:22:68:12:79:78 * ---end--- - * ---ifcfg-rh--- + */ + /* ---ifcfg-rh--- * property: mac-address-blacklist * variable: HWADDR_BLACKLIST(+) * description: It denies usage of the connection for any device whose address @@ -1813,7 +1818,8 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass) * variable: (none) * description: This property is deprecated and not handled by ifcfg-rh-plugin. * ---end--- - * ---dbus--- + */ + /* ---dbus--- * property: security * description: This property is deprecated, but can be set to the value * '802-11-wireless-security' when a wireless security setting is also -- cgit v1.2.1