mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-11 09:18:38 +02:00
Clang reformat
This commit is contained in:
parent
9d7acda8fc
commit
f2051529b6
9 changed files with 42 additions and 28 deletions
|
|
@ -514,8 +514,8 @@ typedef struct _NMDevicePrivate {
|
|||
char *firmware_version;
|
||||
bool firmware_missing : 1;
|
||||
bool nm_plugin_missing : 1;
|
||||
bool
|
||||
hw_addr_perm_fake : 1; /* whether the permanent HW address could not be read and is a fake */
|
||||
bool hw_addr_perm_fake
|
||||
: 1; /* whether the permanent HW address could not be read and is a fake */
|
||||
|
||||
guint8 in_state_changed : 4;
|
||||
|
||||
|
|
|
|||
|
|
@ -466,7 +466,8 @@ add_pair_ciphers(NMWifiAP *ap, NMSettingWirelessSecurity *sec)
|
|||
|
||||
/* If no ciphers are specified, that means "all" WPA ciphers */
|
||||
if (num == 0) {
|
||||
flags |= NM_802_11_AP_SEC_PAIR_TKIP | NM_802_11_AP_SEC_PAIR_CCMP | NM_802_11_AP_SEC_PAIR_GCMP_256;
|
||||
flags |= NM_802_11_AP_SEC_PAIR_TKIP | NM_802_11_AP_SEC_PAIR_CCMP
|
||||
| NM_802_11_AP_SEC_PAIR_GCMP_256;
|
||||
} else {
|
||||
for (i = 0; i < num; i++) {
|
||||
const char *cipher = nm_setting_wireless_security_get_pairwise(sec, i);
|
||||
|
|
@ -496,7 +497,8 @@ add_group_ciphers(NMWifiAP *ap, NMSettingWirelessSecurity *sec)
|
|||
|
||||
/* If no ciphers are specified, that means "all" WPA ciphers */
|
||||
if (num == 0) {
|
||||
flags |= NM_802_11_AP_SEC_GROUP_TKIP | NM_802_11_AP_SEC_GROUP_CCMP | NM_802_11_AP_SEC_GROUP_GCMP_256;
|
||||
flags |= NM_802_11_AP_SEC_GROUP_TKIP | NM_802_11_AP_SEC_GROUP_CCMP
|
||||
| NM_802_11_AP_SEC_GROUP_GCMP_256;
|
||||
} else {
|
||||
for (i = 0; i < num; i++) {
|
||||
const char *cipher = nm_setting_wireless_security_get_group(sec, i);
|
||||
|
|
|
|||
|
|
@ -436,8 +436,8 @@ nm_device_wifi_request_scan_finish(NMDeviceWifi *device, GAsyncResult *result, G
|
|||
(NM_WIFI_DEVICE_CAP_CIPHER_TKIP | NM_WIFI_DEVICE_CAP_CIPHER_CCMP | NM_WIFI_DEVICE_CAP_WPA \
|
||||
| NM_WIFI_DEVICE_CAP_RSN | NM_WIFI_DEVICE_CAP_CIPHER_GCMP_256)
|
||||
|
||||
#define RSN_CAPS (NM_WIFI_DEVICE_CAP_CIPHER_CCMP | NM_WIFI_DEVICE_CAP_CIPHER_GCMP_256 \
|
||||
| NM_WIFI_DEVICE_CAP_RSN)
|
||||
#define RSN_CAPS \
|
||||
(NM_WIFI_DEVICE_CAP_CIPHER_CCMP | NM_WIFI_DEVICE_CAP_CIPHER_GCMP_256 | NM_WIFI_DEVICE_CAP_RSN)
|
||||
|
||||
static gboolean
|
||||
has_proto(NMSettingWirelessSecurity *s_wsec, const char *proto)
|
||||
|
|
|
|||
|
|
@ -1041,7 +1041,7 @@ _nm_properties_override(GArray *properties_override, const NMSettInfoProperty *p
|
|||
GParamSpec *spec = _property_info->param_spec; \
|
||||
GType spec_gtype = spec ? spec->value_type : G_TYPE_INVALID; \
|
||||
\
|
||||
direct_nmtype == NM_VALUE_TYPE_ENUM &&direct_gtype &&G_TYPE_IS_ENUM(direct_gtype) \
|
||||
direct_nmtype == NM_VALUE_TYPE_ENUM && direct_gtype && G_TYPE_IS_ENUM(direct_gtype) \
|
||||
&& NM_IN_SET(spec_gtype, G_TYPE_INT, direct_gtype); \
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -277,7 +277,11 @@ nm_setting_wireless_ap_security_compatible(NMSettingWireless *s_wireless
|
|||
break;
|
||||
if ((found = match_cipher(cipher, "ccmp", ap_wpa, ap_rsn, NM_802_11_AP_SEC_PAIR_CCMP)))
|
||||
break;
|
||||
if ((found = match_cipher(cipher, "gcmp-256", ap_wpa, ap_rsn, NM_802_11_AP_SEC_PAIR_GCMP_256)))
|
||||
if ((found = match_cipher(cipher,
|
||||
"gcmp-256",
|
||||
ap_wpa,
|
||||
ap_rsn,
|
||||
NM_802_11_AP_SEC_PAIR_GCMP_256)))
|
||||
break;
|
||||
}
|
||||
if (!found && num)
|
||||
|
|
@ -300,7 +304,11 @@ nm_setting_wireless_ap_security_compatible(NMSettingWireless *s_wireless
|
|||
break;
|
||||
if ((found = match_cipher(cipher, "ccmp", ap_wpa, ap_rsn, NM_802_11_AP_SEC_GROUP_CCMP)))
|
||||
break;
|
||||
if ((found = match_cipher(cipher, "gcmp-256", ap_wpa, ap_rsn, NM_802_11_AP_SEC_GROUP_GCMP_256)))
|
||||
if ((found = match_cipher(cipher,
|
||||
"gcmp-256",
|
||||
ap_wpa,
|
||||
ap_rsn,
|
||||
NM_802_11_AP_SEC_GROUP_GCMP_256)))
|
||||
break;
|
||||
}
|
||||
if (!found && num)
|
||||
|
|
|
|||
|
|
@ -668,7 +668,9 @@ wext_get_caps(NMWifiUtilsWext *wext, const char *ifname, struct iw_range *range)
|
|||
caps |= _NM_WIFI_DEVICE_CAP_RSN;
|
||||
|
||||
/* Check for cipher support but not WPA support */
|
||||
if ((caps & (_NM_WIFI_DEVICE_CAP_CIPHER_TKIP | _NM_WIFI_DEVICE_CAP_CIPHER_CCMP | _NM_WIFI_DEVICE_CAP_CIPHER_GCMP_256))
|
||||
if ((caps
|
||||
& (_NM_WIFI_DEVICE_CAP_CIPHER_TKIP | _NM_WIFI_DEVICE_CAP_CIPHER_CCMP
|
||||
| _NM_WIFI_DEVICE_CAP_CIPHER_GCMP_256))
|
||||
&& !(caps & (_NM_WIFI_DEVICE_CAP_WPA | _NM_WIFI_DEVICE_CAP_RSN))) {
|
||||
_LOGW(LOGD_WIFI,
|
||||
"%s: device supports WPA ciphers but not WPA protocol; WPA unavailable.",
|
||||
|
|
@ -678,7 +680,9 @@ wext_get_caps(NMWifiUtilsWext *wext, const char *ifname, struct iw_range *range)
|
|||
|
||||
/* Check for WPA support but not cipher support */
|
||||
if ((caps & (_NM_WIFI_DEVICE_CAP_WPA | _NM_WIFI_DEVICE_CAP_RSN))
|
||||
&& !(caps & (_NM_WIFI_DEVICE_CAP_CIPHER_TKIP | _NM_WIFI_DEVICE_CAP_CIPHER_CCMP | _NM_WIFI_DEVICE_CAP_CIPHER_GCMP_256))) {
|
||||
&& !(caps
|
||||
& (_NM_WIFI_DEVICE_CAP_CIPHER_TKIP | _NM_WIFI_DEVICE_CAP_CIPHER_CCMP
|
||||
| _NM_WIFI_DEVICE_CAP_CIPHER_GCMP_256))) {
|
||||
_LOGW(LOGD_WIFI,
|
||||
"%s: device supports WPA protocol but not WPA ciphers; WPA unavailable.",
|
||||
ifname);
|
||||
|
|
|
|||
|
|
@ -933,8 +933,8 @@ _metagen_con_active_general_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS)
|
|||
g_return_val_if_reached(NULL);
|
||||
}
|
||||
|
||||
const NmcMetaGenericInfo
|
||||
*const metagen_con_active_general[_NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_NUM + 1] = {
|
||||
const NmcMetaGenericInfo *const
|
||||
metagen_con_active_general[_NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_NUM + 1] = {
|
||||
#define _METAGEN_CON_ACTIVE_GENERAL(type, name) \
|
||||
[type] = \
|
||||
NMC_META_GENERIC(name, .info_type = type, .get_fcn = _metagen_con_active_general_get_fcn)
|
||||
|
|
@ -1042,8 +1042,8 @@ arr_out:
|
|||
return arr;
|
||||
}
|
||||
|
||||
const NmcMetaGenericInfo
|
||||
*const metagen_con_active_vpn[_NMC_GENERIC_INFO_TYPE_CON_ACTIVE_VPN_NUM + 1] = {
|
||||
const NmcMetaGenericInfo *const
|
||||
metagen_con_active_vpn[_NMC_GENERIC_INFO_TYPE_CON_ACTIVE_VPN_NUM + 1] = {
|
||||
#define _METAGEN_CON_ACTIVE_VPN(type, name) \
|
||||
[type] = NMC_META_GENERIC(name, .info_type = type, .get_fcn = _metagen_con_active_vpn_get_fcn)
|
||||
_METAGEN_CON_ACTIVE_VPN(NMC_GENERIC_INFO_TYPE_CON_VPN_TYPE, "TYPE"),
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ _metagen_device_status_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS)
|
|||
g_return_val_if_reached(NULL);
|
||||
}
|
||||
|
||||
const NmcMetaGenericInfo
|
||||
*const metagen_device_status[_NMC_GENERIC_INFO_TYPE_DEVICE_STATUS_NUM + 1] = {
|
||||
const NmcMetaGenericInfo *const
|
||||
metagen_device_status[_NMC_GENERIC_INFO_TYPE_DEVICE_STATUS_NUM + 1] = {
|
||||
#define _METAGEN_DEVICE_STATUS(type, name) \
|
||||
[type] = NMC_META_GENERIC(name, .info_type = type, .get_fcn = _metagen_device_status_get_fcn)
|
||||
_METAGEN_DEVICE_STATUS(NMC_GENERIC_INFO_TYPE_DEVICE_STATUS_DEVICE, "DEVICE"),
|
||||
|
|
@ -258,8 +258,8 @@ _metagen_device_detail_general_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS)
|
|||
g_return_val_if_reached(NULL);
|
||||
}
|
||||
|
||||
const NmcMetaGenericInfo
|
||||
*const metagen_device_detail_general[_NMC_GENERIC_INFO_TYPE_DEVICE_DETAIL_GENERAL_NUM + 1] = {
|
||||
const NmcMetaGenericInfo *const
|
||||
metagen_device_detail_general[_NMC_GENERIC_INFO_TYPE_DEVICE_DETAIL_GENERAL_NUM + 1] = {
|
||||
#define _METAGEN_DEVICE_DETAIL_GENERAL(type, name) \
|
||||
[type] = NMC_META_GENERIC(name, \
|
||||
.info_type = type, \
|
||||
|
|
@ -498,9 +498,9 @@ _metagen_device_detail_capabilities_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS)
|
|||
g_return_val_if_reached(NULL);
|
||||
}
|
||||
|
||||
const NmcMetaGenericInfo
|
||||
*const metagen_device_detail_capabilities[_NMC_GENERIC_INFO_TYPE_DEVICE_DETAIL_CAPABILITIES_NUM
|
||||
+ 1] = {
|
||||
const NmcMetaGenericInfo *const
|
||||
metagen_device_detail_capabilities[_NMC_GENERIC_INFO_TYPE_DEVICE_DETAIL_CAPABILITIES_NUM
|
||||
+ 1] = {
|
||||
#define _METAGEN_DEVICE_DETAIL_CAPABILITIES(type, name) \
|
||||
[type] = NMC_META_GENERIC(name, \
|
||||
.info_type = type, \
|
||||
|
|
|
|||
|
|
@ -196,8 +196,8 @@ translate_and_out:
|
|||
return value;
|
||||
}
|
||||
|
||||
static const NmcMetaGenericInfo
|
||||
*const metagen_general_status[_NMC_GENERIC_INFO_TYPE_GENERAL_STATUS_NUM + 1] = {
|
||||
static const NmcMetaGenericInfo *const
|
||||
metagen_general_status[_NMC_GENERIC_INFO_TYPE_GENERAL_STATUS_NUM + 1] = {
|
||||
#define _METAGEN_GENERAL_STATUS(type, name) \
|
||||
[type] = NMC_META_GENERIC(name, .info_type = type, .get_fcn = _metagen_general_status_get_fcn)
|
||||
_METAGEN_GENERAL_STATUS(NMC_GENERIC_INFO_TYPE_GENERAL_STATUS_RUNNING, "RUNNING"),
|
||||
|
|
@ -253,8 +253,8 @@ _metagen_general_permissions_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS)
|
|||
g_return_val_if_reached(NULL);
|
||||
}
|
||||
|
||||
static const NmcMetaGenericInfo
|
||||
*const metagen_general_permissions[_NMC_GENERIC_INFO_TYPE_GENERAL_PERMISSIONS_NUM + 1] = {
|
||||
static const NmcMetaGenericInfo *const
|
||||
metagen_general_permissions[_NMC_GENERIC_INFO_TYPE_GENERAL_PERMISSIONS_NUM + 1] = {
|
||||
#define _METAGEN_GENERAL_PERMISSIONS(type, name) \
|
||||
[type] = \
|
||||
NMC_META_GENERIC(name, .info_type = type, .get_fcn = _metagen_general_permissions_get_fcn)
|
||||
|
|
@ -293,8 +293,8 @@ _metagen_general_logging_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARGS)
|
|||
return *d->domains;
|
||||
}
|
||||
|
||||
static const NmcMetaGenericInfo
|
||||
*const metagen_general_logging[_NMC_GENERIC_INFO_TYPE_GENERAL_LOGGING_NUM + 1] = {
|
||||
static const NmcMetaGenericInfo *const
|
||||
metagen_general_logging[_NMC_GENERIC_INFO_TYPE_GENERAL_LOGGING_NUM + 1] = {
|
||||
#define _METAGEN_GENERAL_LOGGING(type, name) \
|
||||
[type] = NMC_META_GENERIC(name, .info_type = type, .get_fcn = _metagen_general_logging_get_fcn)
|
||||
_METAGEN_GENERAL_LOGGING(NMC_GENERIC_INFO_TYPE_GENERAL_LOGGING_LEVEL, "LEVEL"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue