diff options
| author | Michael Biebl <biebl@debian.org> | 2016-03-01 16:55:22 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-03-01 16:55:22 +0100 |
| commit | c2de0d98ba39e0a1a970d066fd19be786092f376 (patch) | |
| tree | 3838363c06a6019db6cf1f882ea34ebded63c38b /clients | |
| parent | 494f296a3baab08522617b24b1f126d8f9a17502 (diff) | |
Imported Upstream version 1.1.91 upstream/1.1.91
Diffstat (limited to 'clients')
75 files changed, 205 insertions, 217 deletions
diff --git a/clients/cli/agent.c b/clients/cli/agent.c index c4ff3f9e..0e39ba97 100644 --- a/clients/cli/agent.c +++ b/clients/cli/agent.c @@ -19,16 +19,14 @@ * Copyright 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include <stdio.h> #include <stdlib.h> #include <errno.h> - #include <readline/readline.h> #include <readline/history.h> -#include "nm-default.h" #include "common.h" #include "utils.h" #include "nm-secret-agent-simple.h" diff --git a/clients/cli/common.c b/clients/cli/common.c index daacce7c..0aa5efc2 100644 --- a/clients/cli/common.c +++ b/clients/cli/common.c @@ -19,18 +19,16 @@ * Copyright 2012 - 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <termios.h> #include <sys/ioctl.h> - #include <readline/readline.h> #include <readline/history.h> -#include "nm-default.h" #include "nm-vpn-helpers.h" #include "common.h" #include "utils.h" diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 9ab926a0..d263154d 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -17,7 +17,7 @@ * Copyright 2010 - 2015 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include <stdio.h> #include <string.h> @@ -29,7 +29,6 @@ #include <readline/readline.h> #include <readline/history.h> -#include "nm-default.h" #include "utils.h" #include "common.h" #include "settings.h" @@ -1532,11 +1531,14 @@ sort_connections (const GPtrArray *cons, NmCli *nmc, const GArray *order) int i; NmcSortInfo compare_info; + if (!cons) + return NULL; + compare_info.nmc = nmc; compare_info.order = order; sorted = g_ptr_array_sized_new (cons->len); - for (i = 0; cons && i < cons->len; i++) + for (i = 0; i < cons->len; i++) g_ptr_array_add (sorted, cons->pdata[i]); g_ptr_array_sort_with_data (sorted, compare_connections, &compare_info); return sorted; @@ -5350,16 +5352,16 @@ cleanup_bt: return FALSE; } if (!vlan_id && ask) - vlan_id = vlan_id_ask = nmc_readline (_("VLAN ID <0-4095>: ")); + vlan_id = vlan_id_ask = nmc_readline (_("VLAN ID <0-4094>: ")); if (!vlan_id) { g_set_error_literal (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT, _("Error: 'id' is required.")); goto cleanup_vlan; } if (vlan_id) { - if (!nmc_string_to_uint (vlan_id, TRUE, 0, 4095, &id)) { + if (!nmc_string_to_uint (vlan_id, TRUE, 0, 4094, &id)) { g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT, - _("Error: 'id': '%s' is not valid; use <0-4095>."), + _("Error: 'id': '%s' is not valid; use <0-4094>."), vlan_id); goto cleanup_vlan; } @@ -5887,14 +5889,14 @@ cleanup_olpc: gboolean success = FALSE; char *username_ask = NULL; const char *username = NULL; - char *protocol_ask = NULL; - const char *protocol = NULL; + char *protocol_ask = NULL, *protocol = NULL; + const char *protocol_c = NULL; const char *password_c = NULL; char *password = NULL; const char *encapsulation_c = NULL; char *encapsulation = NULL; nmc_arg_t exp_args[] = { {"username", TRUE, &username, !ask}, - {"protocol", TRUE, &protocol, !ask}, + {"protocol", TRUE, &protocol_c, !ask}, {"password", TRUE, &password_c, FALSE}, {"encapsulation", TRUE, &encapsulation_c, FALSE}, {NULL} }; @@ -5911,14 +5913,15 @@ cleanup_olpc: } #define PROMPT_ADSL_PROTO "(" NM_SETTING_ADSL_PROTOCOL_PPPOA "/" NM_SETTING_ADSL_PROTOCOL_PPPOE "/" NM_SETTING_ADSL_PROTOCOL_IPOATM "): " - if (!protocol && ask) - protocol = protocol_ask = nmc_readline (_("Protocol %s"), PROMPT_ADSL_PROTO); - if (!protocol) { + if (!protocol_c && ask) + protocol_c = protocol_ask = nmc_readline (_("Protocol %s"), PROMPT_ADSL_PROTO); + if (!protocol_c) { g_set_error_literal (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT, _("Error: 'protocol' is required.")); goto cleanup_adsl; } - if (!check_adsl_protocol (&protocol_ask, error)) + protocol = g_strdup (protocol_c); + if (!check_adsl_protocol (&protocol, error)) goto cleanup_adsl; /* Also ask for all optional arguments if '--ask' is specified. */ @@ -5945,6 +5948,7 @@ cleanup_olpc: cleanup_adsl: g_free (username_ask); g_free (password); + g_free (protocol); g_free (protocol_ask); g_free (encapsulation); @@ -6184,7 +6188,7 @@ cleanup_tun: gs_free char *values_str = NULL; values = nm_utils_enum_get_values (nm_ip_tunnel_mode_get_type (), - NM_IP_TUNNEL_MODE_UKNOWN + 1, + NM_IP_TUNNEL_MODE_UNKNOWN + 1, G_MAXINT); values_str = g_strjoinv (",", (char **) values); g_set_error (error, NMCLI_ERROR, NMC_RESULT_ERROR_USER_INPUT, @@ -6787,7 +6791,7 @@ gen_func_ip_tunnel_mode (const char *text, int state) gs_free const char **words = NULL; words = nm_utils_enum_get_values (nm_ip_tunnel_mode_get_type (), - NM_IP_TUNNEL_MODE_UKNOWN + 1, + NM_IP_TUNNEL_MODE_UNKNOWN + 1, G_MAXINT); return nmc_rl_gen_func_basic (text, state, words); } diff --git a/clients/cli/devices.c b/clients/cli/devices.c index c1df7fee..449fa7db 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -17,7 +17,7 @@ * Copyright 2010 - 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include <stdio.h> #include <string.h> @@ -25,7 +25,6 @@ #include <errno.h> #include <readline/readline.h> -#include "nm-default.h" #include "nm-secret-agent-simple.h" #include "polkit-agent.h" #include "utils.h" @@ -587,8 +586,10 @@ sort_access_points (const GPtrArray *aps) GPtrArray *sorted; int i; + g_return_val_if_fail (aps, NULL); + sorted = g_ptr_array_sized_new (aps->len); - for (i = 0; aps && i < aps->len; i++) + for (i = 0; i < aps->len; i++) g_ptr_array_add (sorted, aps->pdata[i]); g_ptr_array_sort_with_data (sorted, compare_aps, NULL); return sorted; @@ -1926,7 +1927,7 @@ do_device_reapply (NmCli *nmc, int argc, char **argv) info->queue = g_slist_prepend (info->queue, g_object_ref (device)); /* Now reapply the connection to the device */ - nm_device_reapply_async (device, NULL, 0, NULL, reapply_device_cb, info); + nm_device_reapply_async (device, NULL, 0, 0, NULL, reapply_device_cb, info); } error: @@ -3505,7 +3506,7 @@ do_device_lldp_list (NmCli *nmc, int argc, char **argv) } ifname = *argv; } else { - g_string_printf (nmc->return_text, _("Error: unknown parameter: %s"), *argv); + g_string_printf (nmc->return_text, _("Error: invalid extra argument '%s'."), *argv); nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; goto error; } @@ -3514,12 +3515,6 @@ do_device_lldp_list (NmCli *nmc, int argc, char **argv) argv++; } - if (argc > 0) { - g_string_printf (nmc->return_text, _("Error: invalid extra argument '%s'."), *argv); - nmc->return_value = NMC_RESULT_ERROR_USER_INPUT; - goto error; - } - if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0) fields_str = NMC_FIELDS_DEV_LLDP_LIST_COMMON; else if (!nmc->required_fields || strcasecmp (nmc->required_fields, "all") == 0) diff --git a/clients/cli/general.c b/clients/cli/general.c index 5ed1f802..15e73e28 100644 --- a/clients/cli/general.c +++ b/clients/cli/general.c @@ -17,12 +17,11 @@ * Copyright 2010 - 2015 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #include <string.h> #include <stdlib.h> -#include "nm-default.h" #include "polkit-agent.h" #include "utils.h" #include "general.h" diff --git a/clients/cli/nmcli.c b/clients/cli/nmcli.c index 437523da..a7f21161 100644 --- a/clients/cli/nmcli.c +++ b/clients/cli/nmcli.c @@ -20,7 +20,7 @@ */ /* Generated configuration file */ -#include "config.h" +#include "nm-default.h" #include <stdio.h> #include <string.h> @@ -33,7 +33,6 @@ #include <readline/readline.h> #include <readline/history.h> -#include "nm-default.h" #include "polkit-agent.h" #include "nmcli.h" #include "utils.h" @@ -104,7 +103,7 @@ usage (const char *prog_name) " c[onnection] NetworkManager's connections\n" " d[evice] devices managed by NetworkManager\n" " a[gent] NetworkManager secret agent or polkit agent\n" - " m[monitor] monitor NetworkManager changes\n" + " m[onitor] monitor NetworkManager changes\n" "\n"), prog_name); } diff --git a/clients/cli/nmcli.h b/clients/cli/nmcli.h index b26f2576..1b9a08b8 100644 --- a/clients/cli/nmcli.h +++ b/clients/cli/nmcli.h @@ -20,8 +20,6 @@ #ifndef NMC_NMCLI_H #define NMC_NMCLI_H -#include "config.h" - #include <NetworkManager.h> #include <nm-secret-agent-old.h> diff --git a/clients/cli/polkit-agent.c b/clients/cli/polkit-agent.c index b1fcaad8..8b56e953 100644 --- a/clients/cli/polkit-agent.c +++ b/clients/cli/polkit-agent.c @@ -17,7 +17,7 @@ * Copyright 2014 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" #if WITH_POLKIT_AGENT @@ -26,7 +26,6 @@ #include <sys/types.h> #include <unistd.h> -#include "nm-default.h" #include "polkit-agent.h" #include "nm-polkit-listener.h" #include "common.h" diff --git a/clients/cli/settings-docs.c b/clients/cli/settings-docs.c index 8de1ed21..10db2328 100644 --- a/clients/cli/settings-docs.c +++ b/clients/cli/settings-docs.c @@ -24,7 +24,7 @@ NmcPropertyDesc setting_802_11_wireless[] = { { "mode", "Wi-Fi network mode; one of \"infrastructure\", \"adhoc\" or \"ap\". If blank, infrastructure is assumed." }, { "mtu", "If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames." }, { "name", "The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example \"ppp\" or \"wireless\" or \"wired\"." }, - { "powersave", "If set to FALSE, Wi-Fi power saving behavior is disabled. If set to TRUE, Wi-Fi power saving behavior is enabled. All other values are reserved. Note that even though only boolean values are allowed, the property type is an unsigned integer to allow for future expansion." }, + { "powersave", "One of NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2) (disable Wi-Fi power saving), NM_SETTING_WIRELESS_POWERSAVE_ENABLE (3) (enable Wi-Fi power saving), NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1) (don't touch currently configure setting) or NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0) (use the globally configured value). All other values are reserved." }, { "rate", "If non-zero, directs the device to only use the specified bitrate for communication with the access point. Units are in Kb/s, ie 5500 = 5.5 Mbit/s. This property is highly driver dependent and not all devices support setting a static bitrate." }, { "seen-bssids", "A list of BSSIDs (each BSSID formatted as a MAC address like \"00:11:22:33:44:55\") that have been detected as part of the Wi-Fi network. NetworkManager internally tracks previously seen BSSIDs. The property is only meant for reading and reflects the BSSID list of NetworkManager. The changes you make to this property will not be preserved." }, { "ssid", "SSID of the Wi-Fi network. Must be specified." }, @@ -241,6 +241,7 @@ NmcPropertyDesc setting_ip_tunnel[] = { NmcPropertyDesc setting_ipv4[] = { { "addresses", "Array of IP addresses." }, + { "dad-timeout", "Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or 3 seconds). A value greater than zero is a timeout in milliseconds." }, { "dhcp-client-id", "A string sent to the DHCP server to identify the local machine which the DHCP server may use to customize the DHCP lease and options." }, { "dhcp-fqdn", "If the \"dhcp-send-hostname\" property is TRUE, then the specified FQDN will be sent to the DHCP server when acquiring a lease. This property and \"dhcp-hostname\" are mutually exclusive and cannot be set at the same time." }, { "dhcp-hostname", "If the \"dhcp-send-hostname\" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and \"dhcp-fqdn\" are mutually exclusive and cannot be set at the same time." }, @@ -263,8 +264,10 @@ NmcPropertyDesc setting_ipv4[] = { NmcPropertyDesc setting_ipv6[] = { { "addr-gen-mode", "Configure method for creating the address for use with RFC4862 IPv6 Stateless Address Autoconfiguration. The permitted values are: \"eui64\", \"stable-privacy\" or unset. If the property is set to \"eui64\", the addresses will be generated using the interface tokens derived from hardware address. This makes the host part of the address to stay constant, making it possible to track host's presence when it changes networks. The address changes when the interface hardware is replaced. The value of \"stable-privacy\" enables use of cryptographically secure hash of a secret host-specific key along with the connection identification and the network address as specified by RFC7217. This makes it impossible to use the address track host's presence, and makes the address stable when the network interface hardware is replaced. Leaving this unset causes a default that could be subject to change in future versions to be used. Note that this setting is distinct from the Privacy Extensions as configured by \"ip6-privacy\" property and it does not affect the temporary addresses configured with this option." }, { "addresses", "Array of IP addresses." }, + { "dad-timeout", "Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or 3 seconds). A value greater than zero is a timeout in milliseconds." }, { "dhcp-hostname", "If the \"dhcp-send-hostname\" property is TRUE, then the specified name will be sent to the DHCP server when acquiring a lease. This property and \"dhcp-fqdn\" are mutually exclusive and cannot be set at the same time." }, { "dhcp-send-hostname", "If TRUE, a hostname is sent to the DHCP server when acquiring a lease. Some DHCP servers use this hostname to update DNS databases, essentially providing a static hostname for the computer. If the \"dhcp-hostname\" property is NULL and this property is TRUE, the current persistent hostname of the computer is sent." }, + { "dhcp-timeout", "A timeout for a DHCP transaction in seconds." }, { "dns", "Array of IP addresses of DNS servers." }, { "dns-options", "Array of DNS options. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties." }, { "dns-search", "Array of DNS search domains." }, @@ -350,7 +353,7 @@ NmcPropertyDesc setting_tun[] = { NmcPropertyDesc setting_vlan[] = { { "egress-priority-map", "For outgoing packets, a list of mappings from Linux SKB priorities to 802.1p priorities. The mapping is given in the format \"from:to\" where both \"from\" and \"to\" are unsigned integers, ie \"7:3\"." }, { "flags", "One or more flags which control the behavior and features of the VLAN interface. Flags include NM_VLAN_FLAG_REORDER_HEADERS (0x1) (reordering of output packet headers), NM_VLAN_FLAG_GVRP (0x2) (use of the GVRP protocol), and NM_VLAN_FLAG_LOOSE_BINDING (0x4) (loose binding of the interface to its master device's operating state). NM_VLAN_FLAG_MVRP (0x8) (use of the MVRP protocol). The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS, but it used to be 0. To preserve backward compatibility, the default-value in the D-Bus API continues to be 0 and a missing property on D-Bus is still considered as 0." }, - { "id", "The VLAN identifier that the interface created by this connection should be assigned." }, + { "id", "The VLAN identifier that the interface created by this connection should be assigned. The valid range is from 0 to 4094, without the reserved id 4095." }, { "ingress-priority-map", "For incoming packets, a list of mappings from 802.1p priorities to Linux SKB priorities. The mapping is given in the format \"from:to\" where both \"from\" and \"to\" are unsigned integers, ie \"7:3\"." }, { "name", "The setting's name, which uniquely identifies the setting within the connection. Each setting type has a name unique to that type, for example \"ppp\" or \"wireless\" or \"wired\"." }, { "parent", "If given, specifies the parent interface name or parent connection UUID from which this VLAN interface should be created. If this property is not specified, the connection must contain an \"802-3-ethernet\" setting with a \"mac-address\" property." }, @@ -418,8 +421,8 @@ NmcSettingDesc all_settings[] = { { "gsm", setting_gsm, 13 }, { "infiniband", setting_infiniband, 6 }, { "ip-tunnel", setting_ip_tunnel, 13 }, - { "ipv4", setting_ipv4, 18 }, - { "ipv6", setting_ipv6, 17 }, + { "ipv4", setting_ipv4, 19 }, + { "ipv6", setting_ipv6, 19 }, { "macvlan", setting_macvlan, 5 }, { "ppp", setting_ppp, 19 }, { "pppoe", setting_pppoe, 5 }, diff --git a/clients/cli/settings.c b/clients/cli/settings.c index 9f95dfe2..9e0cf08e 100644 --- a/clients/cli/settings.c +++ b/clients/cli/settings.c @@ -17,17 +17,15 @@ * Copyright 2010 - 2015 Red Hat, Inc. */ -#include "config.h" +#include "nm-default.h" + +#include "settings.h" #include <stdlib.h> #include <arpa/inet.h> -#include "nm-default.h" #include "utils.h" #include "common.h" -#include "settings.h" -#include "nm-macros-internal.h" -#include "gsystem-local-alloc.h" /* Forward declarations */ static char *wep_key_type_to_string (NMWepKeyType type); @@ -80,7 +78,6 @@ NmcOutputField nmc_fields_setting_connection[] = { NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT","\ NM_SETTING_CONNECTION_METERED","\ NM_SETTING_CONNECTION_LLDP -#define NMC_FIELDS_SETTING_CONNECTION_COMMON NMC_FIELDS_SETTING_CONNECTION_ALL /* Available fields for NM_SETTING_WIRED_SETTING_NAME */ NmcOutputField nmc_fields_setting_wired[] = { @@ -114,7 +111,6 @@ NmcOutputField nmc_fields_setting_wired[] = { NM_SETTING_WIRED_S390_OPTIONS","\ NM_SETTING_WIRED_WAKE_ON_LAN","\ NM_SETTING_WIRED_WAKE_ON_LAN_PASSWORD -#define NMC_FIELDS_SETTING_WIRED_COMMON NMC_FIELDS_SETTING_WIRED_ALL /* Available fields for NM_SETTING_802_1X_SETTING_NAME */ NmcOutputField nmc_fields_setting_8021X[] = { @@ -186,7 +182,6 @@ NmcOutputField nmc_fields_setting_8021X[] = { NM_SETTING_802_1X_PIN","\ NM_SETTING_802_1X_PIN_FLAGS","\ NM_SETTING_802_1X_SYSTEM_CA_CERTS -#define NMC_FIELDS_SETTING_802_1X_COMMON NMC_FIELDS_SETTING_802_1X_ALL /* Available fields for NM_SETTING_WIRELESS_SETTING_NAME */ NmcOutputField nmc_fields_setting_wireless[] = { @@ -224,7 +219,6 @@ NmcOutputField nmc_fields_setting_wireless[] = { NM_SETTING_WIRELESS_SEEN_BSSIDS","\ NM_SETTING_WIRELESS_HIDDEN"," \ NM_SETTING_WIRELESS_POWERSAVE -#define NMC_FIELDS_SETTING_WIRELESS_COMMON NMC_FIELDS_SETTING_WIRELESS_ALL /* Available fields for NM_SETTING_WIRELESS_SECURITY_SETTING_NAME */ NmcOutputField nmc_fields_setting_wireless_security[] = { @@ -266,7 +260,6 @@ NmcOutputField nmc_fields_setting_wireless_security[] = { NM_SETTING_WIRELESS_SECURITY_PSK_FLAGS","\ NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD","\ NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD_FLAGS -#define NMC_FIELDS_SETTING_WIRELESS_SECURITY_COMMON NMC_FIELDS_SETTING_WIRELESS_SECURITY_ALL /* Available fields for NM_SETTING_IP4_CONFIG_SETTING_NAME */ NmcOutputField nmc_fields_setting_ip4_config[] = { @@ -282,12 +275,13 @@ NmcOutputField nmc_fields_setting_ip4_config[] = { SETTING_FIELD (NM_SETTING_IP_CONFIG_IGNORE_AUTO_ROUTES), /* 9 */ SETTING_FIELD (NM_SETTING_IP_CONFIG_IGNORE_AUTO_DNS), /* 10 */ SETTING_FIELD (NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID), /* 11 */ - SETTING_FIELD (NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT), /* 12 */ + SETTING_FIELD (NM_SETTING_IP_CONFIG_DHCP_TIMEOUT), /* 12 */ SETTING_FIELD (NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME), /* 13 */ SETTING_FIELD (NM_SETTING_IP_CONFIG_DHCP_HOSTNAME), /* 14 */ SETTING_FIELD (NM_SETTING_IP4_CONFIG_DHCP_FQDN), /* 15 */ SETTING_FIELD (NM_SETTING_IP_CONFIG_NEVER_DEFAULT), /* 16 */ SETTING_FIELD (NM_SETTING_IP_CONFIG_MAY_FAIL), /* 17 */ + SETTING_FIELD (NM_SETTING_IP_CONFIG_DAD_TIMEOUT), /* 18 */ {NULL, NULL, 0, NULL, FALSE, FALSE, 0} }; #define NMC_FIELDS_SETTING_IP4_CONFIG_ALL "name"","\ @@ -302,13 +296,13 @@ NmcOutputField nmc_fields_setting_ip4_config[] = { NM_SETTING_IP_CONFIG_IGNORE_AUTO_ROUTES","\ NM_SETTING_IP_CONFIG_IGNORE_AUTO_DNS","\ NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID","\ - NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT","\ + NM_SETTING_IP_CONFIG_DHCP_TIMEOUT","\ NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME","\ NM_SETTING_IP_CONFIG_DHCP_HOSTNAME","\ NM_SETTING_IP4_CONFIG_DHCP_FQDN","\ NM_SETTING_IP_CONFIG_NEVER_DEFAULT","\ - NM_SETTING_IP_CONFIG_MAY_FAIL -#define NMC_FIELDS_SETTING_IP4_CONFIG_COMMON NMC_FIELDS_SETTING_IP4_CONFIG_ALL + NM_SETTING_IP_CONFIG_MAY_FAIL","\ + NM_SETTING_IP_CONFIG_DAD_TIMEOUT /* Available fields for NM_SETTING_IP6_CONFIG_SETTING_NAME */ NmcOutputField nmc_fields_setting_ip6_config[] = { @@ -348,7 +342,6 @@ NmcOutputField nmc_fields_setting_ip6_config[] = { NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE","\ NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME","\ NM_SETTING_IP_CONFIG_DHCP_HOSTNAME -#define NMC_FIELDS_SETTING_IP6_CONFIG_COMMON NMC_FIELDS_SETTING_IP4_CONFIG_ALL /* Available fields for NM_SETTING_SERIAL_SETTING_NAME */ NmcOutputField nmc_fields_setting_serial[] = { @@ -366,7 +359,6 @@ NmcOutputField nmc_fields_setting_serial[] = { NM_SETTING_SERIAL_PARITY","\ NM_SETTING_SERIAL_STOPBITS","\ NM_SETTING_SERIAL_SEND_DELAY -#define NMC_FIELDS_SETTING_SERIAL_COMMON NMC_FIELDS_SETTING_SERIAL_ALL /* Available fields for NM_SETTING_PPP_SETTING_NAME */ NmcOutputField nmc_fields_setting_ppp[] = { @@ -410,7 +402,6 @@ NmcOutputField nmc_fields_setting_ppp[] = { NM_SETTING_PPP_MTU","\ NM_SETTING_PPP_LCP_ECHO_FAILURE","\ NM_SETTING_PPP_LCP_ECHO_INTERVAL -#define NMC_FIELDS_SETTING_PPP_COMMON NMC_FIELDS_SETTING_PPP_ALL /* Available fields for NM_SETTING_PPPOE_SETTING_NAME */ NmcOutputField nmc_fields_setting_pppoe[] = { @@ -426,7 +417,6 @@ NmcOutputField nmc_fields_setting_pppoe[] = { NM_SETTING_PPPOE_USERNAME","\ NM_SETTING_PPPOE_PASSWORD","\ NM_SETTING_PPPOE_PASSWORD_FLAGS -#define NMC_FIELDS_SETTING_PPPOE_COMMON NMC_FIELDS_SETTING_PPPOE_ALL /* Available fields for NM_SETTING_ADSL_SETTING_NAME */ NmcOutputField nmc_fields_setting_adsl[] = { @@ -448,7 +438,6 @@ NmcOutputField nmc_fields_setting_adsl[] = { NM_SETTING_ADSL_ENCAPSULATION","\ NM_SETTING_ADSL_VPI","\ NM_SETTING_ADSL_VCI -#define NMC_FIELDS_SETTING_ADSL_COMMON NMC_FIELDS_SETTING_ADSL_ALL /* Available fields for NM_SETTING_GSM_SETTING_NAME */ NmcOutputField nmc_fields_setting_gsm[] = { @@ -480,7 +469,6 @@ NmcOutputField nmc_fields_setting_gsm[] = { NM_SETTING_GSM_DEVICE_ID","\ NM_SETTING_GSM_SIM_ID","\ NM_SETTING_GSM_SIM_OPERATOR_ID -#define NMC_FIELDS_SETTING_GSM_COMMON NMC_FIELDS_SETTING_GSM_ALL /* Available fields for NM_SETTING_CDMA_SETTING_NAME */ NmcOutputField nmc_fields_setting_cdma[] = { @@ -496,7 +484,6 @@ NmcOutputField nmc_fields_setting_cdma[] = { NM_SETTING_CDMA_USERNAME","\ NM_SETTING_CDMA_PASSWORD","\ NM_SETTING_CDMA_PASSWORD_FLAGS -#define NMC_FIELDS_SETTING_CDMA_COMMON NMC_FIELDS_SETTING_CDMA_ALL /* Available fields for NM_SETTING_BLUETOOTH_SETTING_NAME */ NmcOutputField nmc_fields_setting_bluetooth[] = { @@ -508,7 +495,6 @@ NmcOutputField nmc_fields_setting_bluetooth[] = { #define NMC_FIELDS_SETTING_BLUETOOTH_ALL "name"","\ NM_SETTING_BLUETOOTH_BDADDR","\ NM_SETTING_BLUETOOTH_TYPE -#define NMC_FIELDS_SETTING_BLUETOOTH_COMMON NMC_FIELDS_SETTING_BLUETOOTH_ALL /* Available fields for NM_SETTING_OLPC_MESH_SETTING_NAME */ NmcOutputField nmc_fields_setting_olpc_mesh[] = { @@ -522,7 +508,6 @@ NmcOutputField nmc_fields_setting_olpc_mesh[] = { NM_SETTING_OLPC_MESH_SSID","\ NM_SETTING_OLPC_MESH_CHANNEL","\ NM_SETTING_OLPC_MESH_DHCP_ANYCAST_ADDRESS -#define NMC_FIELDS_SETTING_OLPC_MESH_COMMON NMC_FIELDS_SETTING_OLPC_MESH_ALL /* Available fields for NM_SETTING_VPN_SETTING_NAME */ NmcOutputField nmc_fields_setting_vpn[] = { @@ -542,7 +527,6 @@ NmcOutputField nmc_fields_setting_vpn[] = { NM_SETTING_VPN_SECRETS","\ NM_SETTING_VPN_PERSISTENT","\ NM_SETTING_VPN_TIMEOUT -#define NMC_FIELDS_SETTING_VPN_COMMON NMC_FIELDS_SETTING_VPN_ALL /* Available fields for NM_SETTING_WIMAX_SETTING_NAME */ NmcOutputField nmc_fields_setting_wimax[] = { @@ -554,7 +538,6 @@ NmcOutputField nmc_fields_setting_wimax[] = { #define NMC_FIELDS_SETTING_WIMAX_ALL "name"","\ NM_SETTING_WIMAX_MAC_ADDRESS","\ NM_SETTING_WIMAX_NETWORK_NAME -#define NMC_FIELDS_SETTING_WIMAX_COMMON NMC_FIELDS_SETTING_WIMAX_ALL /* Available fields for NM_SETTING_INFINIBAND_SETTING_NAME */ NmcOutputField nmc_fields_setting_infiniband[] = { @@ -572,7 +555,6 @@ NmcOutputField nmc_fields_setting_infiniband[] = { NM_SETTING_INFINIBAND_TRANSPORT_MODE"," \ NM_SETTING_INFINIBAND_P_KEY"," \ NM_SETTING_INFINIBAND_PARENT -#define NMC_FIELDS_SETTING_INFINIBAND_COMMON NMC_FIELDS_SETTING_INFINIBAND_ALL \ /* Available fields for NM_SETTING_BOND_SETTING_NAME */ NmcOutputField nmc_fields_setting_bond[] = { @@ -582,7 +564,6 @@ NmcOutputField nmc_fields_setting_bond[] = { }; #define NMC_FIELDS_SETTING_BOND_ALL "name"","\ NM_SETTING_BOND_OPTIONS -#define NMC_FIELDS_SETTING_BOND_COMMON NMC_FIELDS_SETTING_BOND_ALL /* Available fields for NM_SETTING_VLAN_SETTING_NAME */ NmcOutputField nmc_fields_setting_vlan[] = { @@ -600,7 +581,6 @@ NmcOutputField nmc_fields_setting_vlan[] = { NM_SETTING_VLAN_FLAGS","\ NM_SETTING_VLAN_INGRESS_PRIORITY_MAP","\ NM_SETTING_VLAN_EGRESS_PRIORITY_MAP -#define NMC_FIELDS_SETTING_VLAN_COMMON NMC_FIELDS_SETTING_VLAN_ALL /* Available fields for NM_SETTING_BRIDGE_SETTING_NAME */ NmcOutputField nmc_fields_setting_bridge[] = { @@ -624,7 +604,6 @@ NmcOutputField nmc_fields_setting_bridge[] = { NM_SETTING_BRIDGE_MAX_AGE","\ NM_SETTING_BRIDGE_AGEING_TIME","\ NM_SETTING_BRIDGE_MULTICAST_SNOOPING -#define NMC_FIELDS_SETTING_BRIDGE_COMMON NMC_FIELDS_SETTING_BRIDGE_ALL /* Available fields for NM_SETTING_BRIDGE_PORT_SETTING_NAME */ NmcOutputField nmc_fields_setting_bridge_port[] = { @@ -638,7 +617,6 @@ NmcOutputField nmc_fields_setting_bridge_port[] = { NM_SETTING_BRIDGE_PORT_PRIORITY","\ NM_SETTING_BRIDGE_PORT_PATH_COST","\ NM_SETTING_BRIDGE_PORT_HAIRPIN_MODE -#define NMC_FIELDS_SETTING_BRIDGE_PORT_COMMON NMC_FIELDS_SETTING_BRIDGE_PORT_ALL /* Available fields for NM_SETTING_TEAM_SETTING_NAME */ NmcOutputField nmc_fields_setting_team[] = { @@ -648,7 +626,6 @@ NmcOutputField nmc_fields_setting_team[] = { }; #define NMC_FIELDS_SETTING_TEAM_ALL "name"","\ NM_SETTING_TEAM_CONFIG -#define NMC_FIELDS_SETTING_TEAM_COMMON NMC_FIELDS_SETTING_TEAM_ALL /* Available fields for NM_SETTING_TEAM_PORT_SETTING_NAME */ NmcOutputField nmc_fields_setting_team_port[] = { @@ -658,7 +635,6 @@ NmcOutputField nmc_fields_setting_team_port[] = { }; #define NMC_FIELDS_SETTING_TEAM_PORT_ALL "name"","\ NM_SETTING_TEAM_PORT_CONFIG -#define NMC_FIELDS_SETTING_TEAM_PORT_COMMON NMC_FIELDS_SETTING_TEAM_PORT_ALL /* Available fields for NM_SETTING_DCB_SETTING_NAME */ NmcOutputField nmc_fields_setting_dcb[] = { @@ -696,7 +672,6 @@ NmcOutputField nmc_fields_setting_dcb[] = { NM_SETTING_DCB_PRIORITY_BANDWIDTH","\ NM_SETTING_DCB_PRIORITY_STRICT_BANDWIDTH","\ NM_SETTING_DCB_PRIORITY_TRAFFIC_CLASS -#define NMC_FIELDS_SETTING_DCB_COMMON NMC_FIELDS_SETTING_DCB_ALL /* Available fields for NM_SETTING_TUN_SETTING_NAME */ NmcOutputField nmc_fields_setting_tun[] = { @@ -716,7 +691,6 @@ NmcOutputField nmc_fields_setting_tun[] = { NM_SETTING_TUN_PI","\ NM_SETTING_TUN_VNET_HDR","\ NM_SETTING_TUN_MULTI_QUEUE -#define NMC_FIELDS_SETTING_TUN_COMMON NMC_FIELDS_SETTING_TUN_ALL /* Available fields for NM_SETTING_IP_TUNNEL_SETTING_NAME */ NmcOutputField nmc_fields_setting_ip_tunnel[] = { @@ -748,7 +722,6 @@ NmcOutputField nmc_fields_setting_ip_tunnel[] = { NM_SETTING_IP_TUNNEL_ENCAPSULATION_LIMIT","\ NM_SETTING_IP_TUNNEL_FLOW_LABEL","\ NM_SETTING_IP_TUNNEL_MTU -#define NMC_FIELDS_SETTING_IP_TUNNEL_COMMON NMC_FIELDS_SETTING_IP_TUNNEL_ALL /* Available fields for NM_SETTING_MACVLAN_SETTING_NAME */ NmcOutputField nmc_fields_setting_macvlan[] = { @@ -764,7 +737,6 @@ NmcOutputField nmc_fields_setting_macvlan[] = { NM_SETTING_MACVLAN_MODE","\ NM_SETTING_MACVLAN_PROMISCUOUS","\ NM_SETTING_MACVLAN_TAP -#define NMC_FIELDS_SETTING_MACVLAN_COMMON NMC_FIELDS_SETTING_MACVLAN_ALL /* Available fields for NM_SETTING_VXLAN_SETTING_NAME */ NmcOutputField nmc_fields_setting_vxlan[] = { @@ -804,7 +776,6 @@ NmcOutputField nmc_fields_setting_vxlan[] = { NM_SETTING_VXLAN_RSC","\ NM_SETTING_VXLAN_L2_MISS","\ NM_SETTING_VXLAN_L3_MISS -#define NMC_FIELDS_SETTING_VXLAN_COMMON NMC_FIELDS_SETTING_VXLAN_ALL /*----------------------------------------------------------------------------*/ static char * @@ -1418,7 +1389,7 @@ nmc_property_ip_tunnel_allowed_mode (NMSetting *setting, const char *prop) if (!words) words = nm_utils_enum_get_values (nm_ip_tunnel_mode_get_type (), - NM_IP_TUNNEL_MODE_UKNOWN + 1, + NM_IP_TUNNEL_MODE_UNKNOWN + 1, G_MAXINT); return words; } @@ -1544,13 +1515,33 @@ DEFINE_GETTER (nmc_property_ipv4_get_route_metric, NM_SETTING_IP_CONFIG_ROUTE_ME DEFINE_GETTER (nmc_property_ipv4_get_ignore_auto_routes, NM_SETTING_IP_CONFIG_IGNORE_AUTO_ROUTES) DEFINE_GETTER (nmc_property_ipv4_get_ignore_auto_dns, NM_SETTING_IP_CONFIG_IGNORE_AUTO_DNS) DEFINE_GETTER (nmc_property_ipv4_get_dhcp_client_id, NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID) -DEFINE_GETTER (nmc_property_ipv4_get_dhcp_timeout, NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT) +DEFINE_GETTER (nmc_property_ipv4_get_dhcp_timeout, NM_SETTING_IP_CONFIG_DHCP_TIMEOUT) DEFINE_GETTER (nmc_property_ipv4_get_dhcp_send_hostname, NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME) DEFINE_GETTER (nmc_property_ipv4_get_dhcp_hostname, NM_SETTING_IP_CONFIG_DHCP_HOSTNAME) DEFINE_GETTER (nmc_property_ipv4_get_dhcp_fqdn, NM_SETTING_IP4_CONFIG_DHCP_FQDN) DEFINE_GETTER (nmc_property_ipv4_get_never_default, NM_SETTING_IP_CONFIG_NEVER_DEFAULT) DEFINE_GETTER (nmc_property_ipv4_get_may_fail, NM_SETTING_IP_CONFIG_MAY_FAIL) +static char * +nmc_property_ipv4_get_dad_timeout (NMSetting *setting, NmcPropertyGetType get_type) +{ + NMSettingIPConfig *s_ip = NM_SETTING_IP_CONFIG (setting); + gint dad_timeout; + + dad_timeout = nm_setting_ip_config_get_dad_timeout (s_ip); + if (get_type == NMC_PROPERTY_GET_PARSABLE) + return g_strdup_printf ("%d", dad_timeout); + + switch (dad_timeout) { + case -1: + return g_strdup_printf (_("%d (default)"), dad_timeout); + case 0: + return g_strdup_printf (_("%d (off)"), dad_timeout); + default: + return g_strdup_printf ("%d", dad_timeout); + } +} + /* --- NM_SETTING_IP6_CONFIG_SETTING_NAME property get functions --- */ DEFINE_GETTER (nmc_property_ipv6_get_method, NM_SETTING_IP_CONFIG_METHOD) DEFINE_GETTER (nmc_property_ipv6_get_dns, NM_SETTING_IP_CONFIG_DNS) @@ -1803,7 +1794,7 @@ nmc_property_ip_tunnel_set_mode (NMSetting *setting, const char *prop, gs_free char *values_str = NULL; values = nm_utils_enum_get_values (nm_ip_tunnel_mode_get_type (), - NM_IP_TUNNEL_MODE_UKNOWN + 1, + NM_IP_TUNNEL_MODE_UNKNOWN + 1, G_MAXINT); values_str = g_strjoinv (",", (char **) values); g_set_error (error, 1, 0, _("invalid mode '%s', use one of %s"), @@ -1862,14 +1853,19 @@ static char * nmc_property_wireless_get_powersave (NMSetting *setting, NmcPropertyGetType get_type) { NMSettingWireless *s_wireless = NM_SETTING_WIRELESS (setting); - guint powersave = nm_setting_wireless_get_powersave (s_wireless); + NMSettingWirelessPowersave powersave; + gs_free char *str = NULL; + char *ret; - if (powersave == 0) - return g_strdup (_("no")); - else if (powersave == 1) - return g_strdup (_("yes")); - else - return g_strdup_printf (_("yes (%u)"), powersave); + powersave = nm_setting_wireless_get_powersave (s_wireless); + str = nm_utils_enum_to_str (nm_setting_wireless_powersave_get_type (), powersave); + + if (get_type == NMC_PROPERTY_GET_PARSABLE) { + ret = str; + str = NULL; + return ret; + } else + return g_strdup_printf ("%s (%u)", str, powersave); } static char * @@ -3306,8 +3302,8 @@ nmc_property_connection_set_lldp (NMSetting *setting, const char *prop, char *p = val_strip; \ gboolean success; \ \ - if (strncmp (val_strip, NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH, STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH)) == 0) \ - p += STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH); \ + if (strncmp (val_strip, NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH, NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH)) == 0) \ + p += NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH); \ \ success = set_func (NM_SETTING_802_1X (setting), \ p, \ @@ -3328,8 +3324,8 @@ nmc_property_connection_set_lldp (NMSetting *setting, const char *prop, const char *path, *password; \ gboolean success; \ \ - if (strncmp (val_strip, NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH, STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH)) == 0) \ - p += STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH); \ + if (strncmp (val_strip, NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH, NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH)) == 0) \ + p += NM_STRLEN (NM_SETTING_802_1X_CERT_SCHEME_PREFIX_PATH); \ \ strv = nmc_strsplit_set (p, " \t,", 2); \ path = strv[0]; \ @@ -4926,20 +4922,33 @@ DEFINE_REMOVER_INDEX_OR_VALUE (nmc_property_wireless_remove_mac_address_blacklis static gboolean nmc_property_wireless_set_powersave (NMSetting *setting, const char *prop, const char *val, GError **error) { - unsigned long powersave_int; - gboolean val_bool = FALSE; - - g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + NMSettingWirelessPowersave powersave; + gs_free const char **options = NULL; + gs_free char *options_str = NULL; + long int t; + gboolean ret; - if (!nmc_string_to_uint (val, TRUE, 0, G_MAXUINT32, &powersave_int)) { - if (!nmc_string_to_bool (val, &val_bool, NULL)) { - g_set_error (error, 1, 0, _("'%s' is not a valid powersave value"), val); + if (nmc_string_to_int_base (val, 0, TRUE, + NM_SETTING_WIRELESS_POWERSAVE_DEFAULT, + NM_SETTING_WIRELESS_POWERSAVE_LAST, + &t)) + powersave = (NMSettingWirelessPowersave) t; + else { + ret = nm_utils_enum_from_str (nm_setting_wireless_powersave_get_type (), + val, + (int *) &powersave, + NULL); + if (!ret) { + options = nm_utils_enum_get_values (nm_setting_wireless_powersave_get_type (), + NM_SETTING_WIRELESS_POWERSAVE_DEFAULT, + NM_SETTING_WIRELESS_POWERSAVE_LAST); + options_str = g_strjoinv (",", (char **) options); + g_set_error (error, 1, 0, _("invalid option '%s', use one of [%s]"), val, options_str); return FALSE; } - powersave_int = val_bool ? 1 : 0; } - g_object_set (setting, prop, (guint32) powersave_int, NULL); + g_object_set (setting, prop, (guint) powersave, NULL); return TRUE; } @@ -6450,9 +6459,9 @@ nmc_properties_init (void) NULL, NULL, NULL); - nmc_add_prop_funcs (GLUE (IP4_CONFIG, DHCP_TIMEOUT), + nmc_add_prop_funcs (GLUE_IP (4, DHCP_TIMEOUT), nmc_property_ipv4_get_dhcp_timeout, - nmc_property_set_uint, + nmc_property_set_int, NULL, NULL, NULL, @@ -6492,6 +6501,13 @@ nmc_properties_init (void) NULL, NULL, NULL); + nmc_add_prop_funcs (GLUE_IP (4, DAD_TIMEOUT), + nmc_property_ipv4_get_dad_timeout, + nmc_property_set_int, + NULL, + NULL, + NULL, + NULL); /* Add editable properties for NM_SETTING_IP6_CONFIG_SETTING_NAME */ nmc_add_prop_funcs (GLUE_IP (6, METHOD), @@ -8088,6 +8104,7 @@ setting_ip4_config_details (NMSetting *setting, NmCli *nmc, const char *one_pro set_val_str (arr, 15, nmc_property_ipv4_get_dhcp_fqdn (setting, NMC_PROPERTY_GET_PRETTY)); set_val_str (arr, 16, nmc_property_ipv4_get_never_default (setting, NMC_PROPERTY_GET_PRETTY)); set_val_str (arr, 17, nmc_property_ipv4_get_may_fail (setting, NMC_PROPERTY_GET_PRETTY)); + set_val_str (arr, 18, nmc_property_ipv4_get_dad_timeout (setting, NMC_PROPERTY_GET_PRETTY)); g_ptr_array_add (nmc->output_data, arr); print_data (nmc); /* Print all data */ diff --git a/clients/cli/utils.c b/clients/cli/utils.c index 898e7f26..d05ea285 100644 --- a/clients/cli/utils.c +++ b/clients/cli/utils.c @@ -18,18 +18,17 @@ */ /* Generated configuration file */ -#include "config.h" + +#include "nm-default.h" #include <stdio.h> #include <string.h> #include <stdlib.h> #include <errno.h> - #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> -#include "nm-default.h" #include "utils.h" int @@ -362,8 +361,13 @@ use_colors (NmCli *nmc) if (nmc == NULL) return FALSE; - if (nmc->use_colors == NMC_USE_COLOR_AUTO) - nmc->use_colors = isatty (fileno (stdout)) ? NMC_USE_COLOR_YES : NMC_USE_COLOR_NO; + if (nmc->use_colors == NMC_USE_COLOR_AUTO) { + if ( g_strcmp0 (g_getenv ("TERM"), "dumb") == 0 + || !isatty (fileno (stdout))) + nmc->use_colors = NMC_USE_COLOR_NO; + else + nmc->use_colors = NMC_USE_COLOR_YES; + } return nmc->use_colors == NMC_USE_COLOR_YES; } diff --git a/clients/common/nm-polkit-listener.c b/clients/common/nm-polkit-listener.c index 9646374e..9c67760b 100644 --- a/clients/common/nm-polkit-listener.c +++ b/clients/common/nm-polkit-listener.c @@ -31,13 +31,12 @@ * https://github.com/lxde/lxqt-policykit/tree/master/src */ -#include "config.h" +#include "nm-default.h" #include <string.h> #include <stdio.h> #include <stdlib.h> -#include "nm-default.h" #include "nm-polkit-listener.h" G_DEFINE_TYPE (NMPolkitListener, nm_polkit_listener, POLKIT_AGENT_TYPE_LISTENER) diff --git a/clients/common/nm-secret-agent-simple.c b/clients/common/nm-secret-agent-simple.c index 233e1409..721f980e 100644 --- a/clients/common/nm-secret-agent-simple.c +++ b/clients/common/nm-secret-agent-simple.c @@ -29,14 +29,13 @@ * replace ShellNetworkAgent. */ -#include "config.h" +#include "nm-default.h" #include <string.h> -#include <NetworkManager.h> -#include <nm-vpn-service-plugin.h> +#include "NetworkManager.h" +#include "nm-vpn-service-plugin.h" -#include "nm-default.h" #include "nm-vpn-helpers.h" #include "nm-secret-agent-simple.h" diff --git a/clients/common/nm-vpn-helpers.c b/clients/common/nm-vpn-helpers.c index 36e8e6b2..1d2a6b0f 100644 --- a/clients/common/nm-vpn-helpers.c +++ b/clients/common/nm-vpn-helpers.c @@ -23,16 +23,14 @@ * Some functions should probably eventually move into libnm. */ -#include "config.h" +#include "nm-default.h" + +#include "nm-vpn-helpers.h" #include <string.h> #include <gmodule.h> -#include "nm-default.h" #include "nm-utils.h" -#include "nm-vpn-helpers.h" - -#include "nm-macros-internal.h" static gboolean plugins_loaded; static GSList *plugins = NULL; diff --git a/clients/nm-online.c b/clients/nm-online.c index c02f9cc9..e8f0be1a 100644 --- a/clients/nm-online.c +++ b/clients/nm-online.c @@ -31,16 +31,14 @@ * Robert Love <rml@novell.com> */ -#include "config.h" +#include "nm-default.h" #include <stdio.h> #include <stdlib.h> #include <getopt.h> #include <locale.h> -#include <NetworkManager.h> - -#include "nm-default.h" +#include "NetworkManager.h" #define PROGRESS_STEPS 15 #define WAIT_STARTUP_TAG "wait-startup" diff --git a/clients/tui/newt/nmt-newt-button-box.c b/clients/tui/newt/nmt-newt-button-box.c index 4fba1daf..5341c76a 100644 --- a/clients/tui/newt/nmt-newt-button-box.c +++ b/clients/tui/newt/nmt-newt-button-box.c @@ -29,7 +29,7 @@ * within each of the two sections. */ -#include "config.h" +#include "nm-default.h" #include <string.h> diff --git a/clients/tui/newt/nmt-newt-button.c b/clients/tui/newt/nmt-newt-button.c index 00dbcd79..c797e222 100644 --- a/clients/tui/newt/nmt-newt-button.c +++ b/clients/tui/newt/nmt-newt-button.c @@ -23,7 +23,7 @@ * #NmtNewtButton implements a button widget. */ -#include "config.h" +#include "nm-default.h" #include "nmt-newt-button.h" #include "nmt-newt-utils.h" diff --git a/clients/tui/newt/nmt-newt-checkbox.c b/clients/tui/newt/nmt-newt-checkbox.c index 69d9920a..af7724b2 100644 --- a/clients/tui/newt/nmt-newt-checkbox.c +++ b/clients/tui/newt/nmt-newt-checkbox.c @@ -23,7 +23,7 @@ * #NmtNewtCheckbox implements a checkbox widget. */ -#include "config.h" +#include "nm-default.h" #include "nmt-newt-checkbox.h" #include "nmt-newt-utils.h" diff --git a/clients/tui/newt/nmt-newt-component.c b/clients/tui/newt/nmt-newt-component.c index 98f6df63..034d6d2d 100644 --- a/clients/tui/newt/nmt-newt-component.c +++ b/clients/tui/newt/nmt-newt-component.c @@ -24,7 +24,7 @@ * wrap a (single) #newtComponent. */ -#include "config.h" +#include "nm-default.h" #include "nmt-newt-component.h" #include "nmt-newt-form.h" diff --git a/clients/tui/newt/nmt-newt-container.c b/clients/tui/newt/nmt-newt-container.c index 03f677fb..927f187e 100644 --- a/clients/tui/newt/nmt-newt-container.c +++ b/clients/tui/newt/nmt-newt-container.c @@ -26,7 +26,7 @@ * #NmtNewtGrid is the most generic container type. */ -#include "config.h" +#include "nm-default.h" #include <string.h> diff --git a/clients/tui/newt/nmt-newt-entry-numeric.c b/clients/tui/newt/nmt-newt-entry-numeric.c index 416b4b79..b79f056a 100644 --- a/clients/tui/newt/nmt-newt-entry-numeric.c +++ b/clients/tui/newt/nmt-newt-entry-numeric.c @@ -26,7 +26,7 @@ * #NmtNewtEntryValidator functions, so you should not set your own. */ -#include "config.h" +#include "nm-default.h" #include <stdlib.h> diff --git a/clients/tui/newt/nmt-newt-entry.c b/clients/tui/newt/nmt-newt-entry.c index 7c92d00a..2715a738 100644 --- a/clients/tui/newt/nmt-newt-entry.c +++ b/clients/tui/newt/nmt-newt-entry.c @@ -26,7 +26,7 @@ * See also #NmtNewtEntryNumeric, for numeric-only entries. */ -#include "config.h" +#include "nm-default.h" #include <string.h> diff --git a/clients/tui/newt/nmt-newt-form.c b/clients/tui/newt/nmt-newt-form.c index ce401e25..835c1aba 100644 --- a/clients/tui/newt/nmt-newt-form.c +++ b/clients/tui/newt/nmt-newt-form.c @@ -24,7 +24,7 @@ * "form" (aka dialog) to the user. */ -#include "config.h" +#include "nm-default.h" #include <fcntl.h> #include <string.h> diff --git a/clients/tui/newt/nmt-newt-grid.c b/clients/tui/newt/nmt-newt-grid.c index ac967334..4333e0dc 100644 --- a/clients/tui/newt/nmt-newt-grid.c +++ b/clients/tui/newt/nmt-newt-grid.c @@ -40,7 +40,7 @@ * must be implemented by the container... */ -#include "config.h" +#include "nm-default.h" #include <string.h> diff --git a/clients/tui/newt/nmt-newt-hacks.c b/clients/tui/newt/nmt-newt-hacks.c index 2d9b1725..5f69643a 100644 --- a/clients/tui/newt/nmt-newt-hacks.c +++ b/clients/tui/newt/nmt-newt-hacks.c @@ -24,7 +24,7 @@ * functions that were added after 0.52.15. */ -#include "config.h" +#include "nm-default.h" #include "nmt-newt-hacks.h" diff --git a/clients/tui/newt/nmt-newt-hacks.h b/clients/tui/newt/nmt-newt-hacks.h index ba8464af..d4eb3fd2 100644 --- a/clients/tui/newt/nmt-newt-hacks.h +++ b/clients/tui/newt/nmt-newt-hacks.h @@ -19,8 +19,6 @@ #ifndef NMT_NEWT_HACKS_H #define NMT_NEWT_HACKS_H -#include "config.h" - #include <newt.h> #ifndef HAVE_NEWTCOMPONENTGETSIZE diff --git a/clients/tui/newt/nmt-newt-label.c b/clients/tui/newt/nmt-newt-label.c index 9c4df8ed..f9aed8a3 100644 --- a/clients/tui/newt/nmt-newt-label.c +++ b/clients/tui/newt/nmt-newt-label.c @@ -25,7 +25,7 @@ * See also #NmtNewtTextbox, for multiline. */ -#include "config.h" +#include "nm-default.h" #include <string.h> diff --git a/clients/tui/newt/nmt-newt-listbox.c b/clients/tui/newt/nmt-newt-listbox.c index e450df91..15a89b0b 100644 --- a/clients/tui/newt/nmt-newt-listbox.c +++ b/clients/tui/newt/nmt-newt-listbox.c @@ -31,7 +31,7 @@ * presses Return on a selection. */ -#include "config.h" +#include "nm-default.h" #include "nmt-newt-listbox.h" #include "nmt-newt-form.h" diff --git a/clients/tui/newt/nmt-newt-popup.c b/clients/tui/newt/nmt-newt-popup.c index f7813063..e171e153 100644 --- a/clients/tui/newt/nmt-newt-popup.c +++ b/clients/tui/newt/nmt-newt-popup.c @@ -26,7 +26,7 @@ * #NmtNewtForm containing an #NmtNewtListbox to select from. */ -#include "config.h" +#include "nm-default.h" #include "nmt-newt-popup.h" #include "nmt-newt-form.h" diff --git a/clients/tui/newt/nmt-newt-section.c b/clients/tui/newt/nmt-newt-section.c index 1a5035fc..38152c96 100644 --- a/clients/tui/newt/nmt-newt-section.c +++ b/clients/tui/newt/nmt-newt-section.c @@ -35,7 +35,7 @@ * extent of the section. */ -#include "config.h" +#include "nm-default.h" #include <string.h> diff --git a/clients/tui/newt/nmt-newt-separator.c b/clients/tui/newt/nmt-newt-separator.c index 07deb1af..0317069a 100644 --- a/clients/tui/newt/nmt-newt-separator.c +++ b/clients/tui/newt/nmt-newt-separator.c @@ -25,7 +25,7 @@ * between widgets in containers that don't implement padding. */ -#include "config.h" +#include "nm-default.h" #include "nmt-newt-separator.h" diff --git a/clients/tui/newt/nmt-newt-stack.c b/clients/tui/newt/nmt-newt-stack.c index d94bdebf..3abf00b1 100644 --- a/clients/tui/newt/nmt-newt-stack.c +++ b/clients/tui/newt/nmt-newt-stack.c @@ -29,7 +29,7 @@ * children. */ -#include "config.h" +#include "nm-default.h" #include <string.h> diff --git a/clients/tui/newt/nmt-newt-textbox.c b/clients/tui/newt/nmt-newt-textbox.c index 3d297160..73794f5e 100644 --- a/clients/tui/newt/nmt-newt-textbox.c +++ b/clients/tui/newt/nmt-newt-textbox.c @@ -24,7 +24,7 @@ * word-wrapping. */ -#include "config.h" +#include "nm-default.h" #include <string.h> diff --git a/clients/tui/newt/nmt-newt-toggle-button.c b/clients/tui/newt/nmt-newt-toggle-button.c index ec4d9aca..5397bfec 100644 --- a/clients/tui/newt/nmt-newt-toggle-button.c +++ b/clients/tui/newt/nmt-newt-toggle-button.c @@ -23,7 +23,7 @@ * #NmtNewtToggleButton implements a two-state toggle button. */ -#include "config.h" +#include "nm-default.h" #include "nmt-newt-toggle-button.h" diff --git a/clients/tui/newt/nmt-newt-utils.c b/clients/tui/newt/nmt-newt-utils.c index 841144d8..a8541829 100644 --- a/clients/tui/newt/nmt-newt-utils.c +++ b/clients/tui/newt/nmt-newt-utils.c @@ -21,14 +21,13 @@ * @short_description: Utility functions */ -#include "config.h" +#include "nm-default.h" #include <errno.h> #include <stdarg.h> #include <unistd.h> #include <sys/wait.h> -#include "nm-default.h" #include "nmt-newt-utils.h" static void diff --git a/clients/tui/newt/nmt-newt-widget.c b/clients/tui/newt/nmt-newt-widget.c index 24c94db9..5602c062 100644 --- a/clients/tui/newt/nmt-newt-widget.c +++ b/clients/tui/newt/nmt-newt-widget.c @@ -34,7 +34,7 @@ * FIXME: need RTL support */ -#include "config.h" +#include "nm-default.h" #include "nmt-newt-widget.h" #include "nmt-newt-form.h" diff --git a/clients/tui/nm-editor-bindings.c b/clients/tui/nm-editor-bindings.c index a21ed666..3753aaa9 100644 --- a/clients/tui/nm-editor-bindings.c +++ b/clients/tui/nm-editor-bindings.c @@ -25,7 +25,7 @@ * shared between nmtui, nm-connection-editor, and gnome-control-center. */ -#include "config.h" +#include "nm-default.h" #include <arpa/inet.h> #include <netinet/in.h> diff --git a/clients/tui/nm-editor-utils.c b/clients/tui/nm-editor-utils.c index 026ef231..e582d41f 100644 --- a/clients/tui/nm-editor-utils.c +++ b/clients/tui/nm-editor-utils.c @@ -25,11 +25,10 @@ * nm-connection-editor, and gnome-control-center. */ -#include "config.h" +#include "nm-default.h" -#include <NetworkManager.h> +#include "NetworkManager.h" -#include "nm-default.h" #include "nm-editor-utils.h" #if 0 #include "nm-vpn-helpers.h" diff --git a/clients/tui/nmt-address-list.c b/clients/tui/nmt-address-list.c index 3faf3442..53990d6a 100644 --- a/clients/tui/nmt-address-list.c +++ b/clients/tui/nmt-address-list.c @@ -28,7 +28,7 @@ * functions. */ -#include "config.h" +#include "nm-default.h" #include <arpa/inet.h> #include <netinet/in.h> diff --git a/clients/tui/nmt-connect-connection-list.c b/clients/tui/nmt-connect-connection-list.c index c21cc5be..0aecd387 100644 --- a/clients/tui/nmt-connect-connection-list.c +++ b/clients/tui/nmt-connect-connection-list.c @@ -24,11 +24,11 @@ * access points displayed by "nmtui connect". */ -#include "config.h" +#include "nm-default.h" #include <stdlib.h> -#include <NetworkManager.h> +#include "NetworkManager.h" #include "nmtui.h" #include "nmt-connect-connection-list.h" diff --git a/clients/tui/nmt-device-entry.c b/clients/tui/nmt-device-entry.c index 2760b149..86e92ca5 100644 --- a/clients/tui/nmt-device-entry.c +++ b/clients/tui/nmt-device-entry.c @@ -34,13 +34,13 @@ * to implement that then we should make it just an #NmtNewtEntry. */ -#include "config.h" +#include "nm-default.h" #include <string.h> #include <sys/socket.h> #include <linux/if_arp.h> -#include <NetworkManager.h> +#include "NetworkManager.h" #include "nmtui.h" #include "nmt-device-entry.h" diff --git a/clients/tui/nmt-edit-connection-list.c b/clients/tui/nmt-edit-connection-list.c index 72e8c706..a1a59e01 100644 --- a/clients/tui/nmt-edit-connection-list.c +++ b/clients/tui/nmt-edit-connection-list.c @@ -24,7 +24,7 @@ * "nmtui edit". */ -#include "config.h" +#include "nm-default.h" #include "nmtui.h" #include "nmtui-edit.h" diff --git a/clients/tui/nmt-editor-grid.c b/clients/tui/nmt-editor-grid.c index 118bf01d..a57e780b 100644 --- a/clients/tui/nmt-editor-grid.c +++ b/clients/tui/nmt-editor-grid.c @@ -37,7 +37,7 @@ * section border into account as well. */ -#include "config.h" +#include "nm-default.h" #include <string.h> diff --git a/clients/tui/nmt-editor-page-device.c b/clients/tui/nmt-editor-page-device.c index 0a9b18e0..d303604a 100644 --- a/clients/tui/nmt-editor-page-device.c +++ b/clients/tui/nmt-editor-page-device.c @@ -28,7 +28,7 @@ * an actual page type. */ -#include "config.h" +#include "nm-default.h" #include "nmt-editor-page-device.h" diff --git a/clients/tui/nmt-editor-page.c b/clients/tui/nmt-editor-page.c index f2afc8c7..44abe273 100644 --- a/clients/tui/nmt-editor-page.c +++ b/clients/tui/nmt-editor-page.c @@ -24,7 +24,7 @@ * A "page" is a set of related #NmtEditorSections. */ -#include "config.h" +#include "nm-default.h" #include "nmt-editor-page.h" diff --git a/clients/tui/nmt-editor-section.c b/clients/tui/nmt-editor-section.c index b9a3ae83..e7e51913 100644 --- a/clients/tui/nmt-editor-section.c +++ b/clients/tui/nmt-editor-section.c @@ -23,7 +23,7 @@ * #NmtEditorSection is the abstract base class for #NmtEditor sections. */ -#include "config.h" +#include "nm-default.h" #include "nmt-editor-section.h" #include "nmt-newt-toggle-button.h" diff --git a/clients/tui/nmt-editor.c b/clients/tui/nmt-editor.c index aaa73cbe..12f35b56 100644 --- a/clients/tui/nmt-editor.c +++ b/clients/tui/nmt-editor.c @@ -23,13 +23,12 @@ * #NmtEditor is the top-level form for editing a connection. */ -#include "config.h" +#include "nm-default.h" #include "nmt-editor.h" -#include <nm-utils.h> +#include "nm-utils.h" -#include "nm-default.h" #include "nmtui.h" #include "nm-editor-utils.h" diff --git a/clients/tui/nmt-ip-entry.c b/clients/tui/nmt-ip-entry.c index d31a1f46..8d8f888f 100644 --- a/clients/tui/nmt-ip-entry.c +++ b/clients/tui/nmt-ip-entry.c @@ -27,7 +27,7 @@ * contains a valid IP address. */ -#include "config.h" +#include "nm-default.h" #include <arpa/inet.h> #include <netinet/in.h> diff --git a/clients/tui/nmt-mac-entry.c b/clients/tui/nmt-mac-entry.c index 6501f09a..d0f07e12 100644 --- a/clients/tui/nmt-mac-entry.c +++ b/clients/tui/nmt-mac-entry.c @@ -26,11 +26,11 @@ * on whether it currently contains a valid hardware address. */ -#include "config.h" +#include "nm-default.h" #include <string.h> -#include <NetworkManager.h> +#include "NetworkManager.h" #include "nmt-mac-entry.h" diff --git a/clients/tui/nmt-mtu-entry.c b/clients/tui/nmt-mtu-entry.c index 9f11af0a..3909c836 100644 --- a/clients/tui/nmt-mtu-entry.c +++ b/clients/tui/nmt-mtu-entry.c @@ -30,7 +30,7 @@ * indicating the units used by the entry. */ -#include "config.h" +#include "nm-default.h" #include <stdlib.h> diff --git a/clients/tui/nmt-page-bond.c b/clients/tui/nmt-page-bond.c index ecc9aefc..259ecfc1 100644 --- a/clients/tui/nmt-page-bond.c +++ b/clients/tui/nmt-page-bond.c @@ -25,9 +25,8 @@ * can't just use #GBinding. */ -#include "config.h" - #include "nm-default.h" + #include "nmt-page-bond.h" #include "nmt-address-list.h" diff --git a/clients/tui/nmt-page-bridge-port.c b/clients/tui/nmt-page-bridge-port.c index fdf44039..47e584a1 100644 --- a/clients/tui/nmt-page-bridge-port.c +++ b/clients/tui/nmt-page-bridge-port.c @@ -21,9 +21,8 @@ * @short_description: The editor page for Bridge ports */ -#include "config.h" - #include "nm-default.h" + #include "nmt-page-bridge-port.h" G_DEFINE_TYPE (NmtPageBridgePort, nmt_page_bridge_port, NMT_TYPE_EDITOR_PAGE) diff --git a/clients/tui/nmt-page-bridge.c b/clients/tui/nmt-page-bridge.c index e9b0e66d..b5eb9ec8 100644 --- a/clients/tui/nmt-page-bridge.c +++ b/clients/tui/nmt-page-bridge.c @@ -21,9 +21,8 @@ * @short_description: The editor page for Bridge connections */ -#include "config.h" - #include "nm-default.h" + #include "nmt-page-bridge.h" #include "nmt-address-list.h" diff --git a/clients/tui/nmt-page-dsl.c b/clients/tui/nmt-page-dsl.c index 2346b496..cd8175b9 100644 --- a/clients/tui/nmt-page-dsl.c +++ b/clients/tui/nmt-page-dsl.c @@ -21,9 +21,8 @@ * @short_description: The editor page for DSL connections */ -#include "config.h" - #include "nm-default.h" + #include "nmt-page-dsl.h" #include "nmt-page-ethernet.h" #include "nmt-page-ppp.h" diff --git a/clients/tui/nmt-page-ethernet.c b/clients/tui/nmt-page-ethernet.c index fed81f1c..dfe2e440 100644 --- a/clients/tui/nmt-page-ethernet.c +++ b/clients/tui/nmt-page-ethernet.c @@ -21,9 +21,8 @@ * @short_description: The editor page for Ethernet connections */ -#include "config.h" - #include "nm-default.h" + #include "nmt-page-ethernet.h" #include "nmt-mac-entry.h" #include "nmt-mtu-entry.h" diff --git a/clients/tui/nmt-page-infiniband.c b/clients/tui/nmt-page-infiniband.c index e10c5a7a..91445f75 100644 --- a/clients/tui/nmt-page-infiniband.c +++ b/clients/tui/nmt-page-infiniband.c @@ -21,9 +21,8 @@ * @short_description: The editor page for InfiniBand connections */ -#include "config.h" - #include "nm-default.h" + #include "nmt-page-infiniband.h" #include "nmt-mtu-entry.h" diff --git a/clients/tui/nmt-page-ip4.c b/clients/tui/nmt-page-ip4.c index 2cc4f6af..deb0f509 100644 --- a/clients/tui/nmt-page-ip4.c +++ b/clients/tui/nmt-page-ip4.c @@ -21,11 +21,10 @@ * @short_description: The editor page for IP4 configuration */ -#include "config.h" +#include "nm-default.h" #include <stdlib.h> -#include "nm-default.h" #include "nmt-page-ip4.h" #include "nmt-ip-entry.h" #include "nmt-address-list.h" diff --git a/clients/tui/nmt-page-ip6.c b/clients/tui/nmt-page-ip6.c index e547122b..14802ace 100644 --- a/clients/tui/nmt-page-ip6.c +++ b/clients/tui/nmt-page-ip6.c @@ -21,11 +21,10 @@ * @short_description: The editor page for IP6 configuration */ -#include "config.h" +#include "nm-default.h" #include <stdlib.h> -#include "nm-default.h" #include "nmt-page-ip6.h" #include "nmt-ip-entry.h" #include "nmt-address-list.h" diff --git a/clients/tui/nmt-page-ppp.c b/clients/tui/nmt-page-ppp.c index 662ebd9c..64f4b9b8 100644 --- a/clients/tui/nmt-page-ppp.c +++ b/clients/tui/nmt-page-ppp.c @@ -21,11 +21,10 @@ * @short_description: The editor page for PPP configuration */ -#include "config.h" +#include "nm-default.h" #include <stdlib.h> -#include "nm-default.h" #include "nmt-page-ppp.h" #include "nmt-newt-section.h" #include "nmt-newt-separator.h" diff --git a/clients/tui/nmt-page-team-port.c b/clients/tui/nmt-page-team-port.c index 797c1cf1..af2221ad 100644 --- a/clients/tui/nmt-page-team-port.c +++ b/clients/tui/nmt-page-team-port.c @@ -21,9 +21,8 @@ * @short_description: The editor page for Team ports. */ -#include "config.h" - #include "nm-default.h" + #include "nmt-page-team-port.h" G_DEFINE_TYPE (NmtPageTeamPort, nmt_page_team_port, NMT_TYPE_EDITOR_PAGE) diff --git a/clients/tui/nmt-page-team.c b/clients/tui/nmt-page-team.c index 572941b6..d7c4c425 100644 --- a/clients/tui/nmt-page-team.c +++ b/clients/tui/nmt-page-team.c @@ -21,9 +21,8 @@ * @short_description: The editor page for Team connections */ -#include "config.h" - #include "nm-default.h" + #include "nmt-page-team.h" #include "nmt-slave-list.h" diff --git a/clients/tui/nmt-page-vlan.c b/clients/tui/nmt-page-vlan.c index d392c552..c63b1904 100644 --- a/clients/tui/nmt-page-vlan.c +++ b/clients/tui/nmt-page-vlan.c @@ -21,9 +21,8 @@ * @short_description: The editor page for VLAN connections */ -#include "config.h" - #include "nm-default.h" + #include "nm-editor-bindings.h" #include "nmt-page-vlan.h" @@ -108,7 +107,7 @@ nmt_page_vlan_constructed (GObject *object) G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); nmt_editor_grid_append (grid, NULL, widget, NULL); - widget = id_entry = nmt_newt_entry_numeric_new (8, 0, 4095); + widget = id_entry = nmt_newt_entry_numeric_new (8, 0, 4094); g_object_bind_property (s_vlan, NM_SETTING_VLAN_ID, widget, "text", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); diff --git a/clients/tui/nmt-page-wifi.c b/clients/tui/nmt-page-wifi.c index c4b085ea..cd9b60e1 100644 --- a/clients/tui/nmt-page-wifi.c +++ b/clients/tui/nmt-page-wifi.c @@ -25,11 +25,10 @@ * properties. */ -#include "config.h" +#include "nm-default.h" #include <stdlib.h> -#include "nm-default.h" #include "nmt-page-wifi.h" #include "nmt-mac-entry.h" #include "nmt-mtu-entry.h" diff --git a/clients/tui/nmt-password-dialog.c b/clients/tui/nmt-password-dialog.c index 8eca7dc0..fb9567e6 100644 --- a/clients/tui/nmt-password-dialog.c +++ b/clients/tui/nmt-password-dialog.c @@ -24,7 +24,7 @@ * secrets when activating a connection. */ -#include "config.h" +#include "nm-default.h" #include "nmt-password-dialog.h" #include "nm-secret-agent-simple.h" diff --git a/clients/tui/nmt-password-fields.c b/clients/tui/nmt-password-fields.c index cba64935..013d9695 100644 --- a/clients/tui/nmt-password-fields.c +++ b/clients/tui/nmt-password-fields.c @@ -25,7 +25,7 @@ * "Show password" checkbox that toggles whether the password is visible. */ -#include "config.h" +#include "nm-default.h" #include "nmt-password-fields.h" diff --git a/clients/tui/nmt-route-editor.c b/clients/tui/nmt-route-editor.c index dc4d118b..964e3ff4 100644 --- a/clients/tui/nmt-route-editor.c +++ b/clients/tui/nmt-route-editor.c @@ -25,9 +25,8 @@ * wide to fit into the main window. */ -#include "config.h" - #include "nm-default.h" + #include "nmt-route-editor.h" #include "nmt-route-table.h" diff --git a/clients/tui/nmt-route-entry.c b/clients/tui/nmt-route-entry.c index 1cc99940..f7c75e0a 100644 --- a/clients/tui/nmt-route-entry.c +++ b/clients/tui/nmt-route-entry.c @@ -26,13 +26,13 @@ * This is used as a building block by #NmtRouteTable. */ -#include "config.h" +#include "nm-default.h" #include <arpa/inet.h> #include <netinet/in.h> #include <stdlib.h> -#include <NetworkManager.h> +#include "NetworkManager.h" #include "nmt-route-entry.h" #include "nmt-ip-entry.h" diff --git a/clients/tui/nmt-route-table.c b/clients/tui/nmt-route-table.c index 0731acb6..7005e8ad 100644 --- a/clients/tui/nmt-route-table.c +++ b/clients/tui/nmt-route-table.c @@ -24,13 +24,13 @@ * and buttons to add and remove entries. */ -#include "config.h" +#include "nm-default.h" #include <arpa/inet.h> #include <netinet/in.h> #include <stdlib.h> -#include <NetworkManager.h> +#include "NetworkManager.h" #include "nmt-route-table.h" #include "nmt-route-entry.h" diff --git a/clients/tui/nmt-slave-list.c b/clients/tui/nmt-slave-list.c index 5a9b7482..a8c31e05 100644 --- a/clients/tui/nmt-slave-list.c +++ b/clients/tui/nmt-slave-list.c @@ -24,9 +24,9 @@ * slaves of a connection. */ -#include "config.h" +#include "nm-default.h" -#include <NetworkManager.h> +#include "NetworkManager.h" #include "nmt-slave-list.h" diff --git a/clients/tui/nmt-utils.c b/clients/tui/nmt-utils.c index f2bf70db..a8c1c5f0 100644 --- a/clients/tui/nmt-utils.c +++ b/clients/tui/nmt-utils.c @@ -21,7 +21,7 @@ * @short_description: Miscellaneous nmtui-specific utilities */ -#include "config.h" +#include "nm-default.h" #include <string.h> diff --git a/clients/tui/nmt-widget-list.c b/clients/tui/nmt-widget-list.c index b314e146..2fd5af02 100644 --- a/clients/tui/nmt-widget-list.c +++ b/clients/tui/nmt-widget-list.c @@ -30,7 +30,7 @@ * FIXME: The way this works is sort of weird. */ -#include "config.h" +#include "nm-default.h" #include <arpa/inet.h> #include <netinet/in.h> diff --git a/clients/tui/nmtui-connect.c b/clients/tui/nmtui-connect.c index 9d705bf1..46e33617 100644 --- a/clients/tui/nmtui-connect.c +++ b/clients/tui/nmtui-connect.c @@ -24,7 +24,7 @@ * including presenting a password dialog if necessary. */ -#include "config.h" +#include "nm-default.h" #include <stdlib.h> diff --git a/clients/tui/nmtui-edit.c b/clients/tui/nmtui-edit.c index 258b798a..c7efd856 100644 --- a/clients/tui/nmtui-edit.c +++ b/clients/tui/nmtui-edit.c @@ -23,11 +23,11 @@ * nmtui-edit implements editing #NMConnections. */ -#include "config.h" +#include "nm-default.h" #include <stdlib.h> -#include <NetworkManager.h> +#include "NetworkManager.h" #include "nmtui.h" #include "nmtui-edit.h" diff --git a/clients/tui/nmtui-hostname.c b/clients/tui/nmtui-hostname.c index f77a918b..ada2393f 100644 --- a/clients/tui/nmtui-hostname.c +++ b/clients/tui/nmtui-hostname.c @@ -23,7 +23,7 @@ * nmtui-hostname implements the "set hostname" functionality */ -#include "config.h" +#include "nm-default.h" #include "nmt-newt.h" diff --git a/clients/tui/nmtui.c b/clients/tui/nmtui.c index 20e7d02b..47ba5bf5 100644 --- a/clients/tui/nmtui.c +++ b/clients/tui/nmtui.c @@ -24,15 +24,14 @@ * nmtui_edit(), and nmtui_hostname(). */ -#include "config.h" +#include "nm-default.h" #include <locale.h> #include <stdlib.h> #include <string.h> -#include <NetworkManager.h> +#include "NetworkManager.h" -#include "nm-default.h" #include "nmt-newt.h" #include "nm-editor-bindings.h" |