mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 09:50:09 +01:00
libnm: rename DNSOptionDesc and @dns_option_descs to have an "nm"-prefix
Declarations in header files should always have an "nm" related
prefix.
Fixes: 019943bb5d
This commit is contained in:
parent
533f9fa2d2
commit
670ca44721
6 changed files with 13 additions and 13 deletions
|
|
@ -174,13 +174,13 @@ typedef struct {
|
|||
const char *name;
|
||||
gboolean numeric;
|
||||
gboolean ipv6_only;
|
||||
} DNSOptionDesc;
|
||||
} NMUtilsDNSOptionDesc;
|
||||
|
||||
extern const DNSOptionDesc dns_option_descs[];
|
||||
extern const NMUtilsDNSOptionDesc _nm_utils_dns_option_descs[];
|
||||
|
||||
gboolean _nm_utils_dns_option_validate (const char *option, char **out_name,
|
||||
long *out_value, gboolean ipv6,
|
||||
const DNSOptionDesc *option_descs);
|
||||
const NMUtilsDNSOptionDesc *option_descs);
|
||||
int _nm_utils_dns_option_find_idx (GPtrArray *array, const char *option);
|
||||
|
||||
/***********************************************************/
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
* related to IP addressing, routing, and Domain Name Service.
|
||||
**/
|
||||
|
||||
const DNSOptionDesc dns_option_descs[] = {
|
||||
const NMUtilsDNSOptionDesc _nm_utils_dns_option_descs[] = {
|
||||
{ NM_SETTING_DNS_OPTION_DEBUG, FALSE, FALSE },
|
||||
{ NM_SETTING_DNS_OPTION_NDOTS, TRUE, FALSE },
|
||||
{ NM_SETTING_DNS_OPTION_TIMEOUT, TRUE, FALSE },
|
||||
|
|
@ -1473,7 +1473,7 @@ nm_setting_ip_config_next_valid_dns_option (NMSettingIPConfig *setting, guint id
|
|||
for (; idx < priv->dns_options->len; idx++) {
|
||||
if (_nm_utils_dns_option_validate (priv->dns_options->pdata[idx], NULL, NULL,
|
||||
NM_IS_SETTING_IP6_CONFIG (setting),
|
||||
dns_option_descs))
|
||||
_nm_utils_dns_option_descs))
|
||||
return idx;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3406,9 +3406,9 @@ _nm_utils_ascii_str_to_int64 (const char *str, guint base, gint64 min, gint64 ma
|
|||
|
||||
static gboolean
|
||||
validate_dns_option (const char *name, gboolean numeric, gboolean ipv6,
|
||||
const DNSOptionDesc *option_descs)
|
||||
const NMUtilsDNSOptionDesc *option_descs)
|
||||
{
|
||||
const DNSOptionDesc *desc;
|
||||
const NMUtilsDNSOptionDesc *desc;
|
||||
|
||||
if (!option_descs)
|
||||
return !!*name;
|
||||
|
|
@ -3429,7 +3429,7 @@ validate_dns_option (const char *name, gboolean numeric, gboolean ipv6,
|
|||
* @out_name: (out) (allow-none) the option name
|
||||
* @out_value: (out) (allow-none) the option value
|
||||
* @ipv6: whether the option refers to a IPv6 configuration
|
||||
* @option_descs: (allow-none) an array of DNSOptionDesc which describes the
|
||||
* @option_descs: (allow-none) an array of NMUtilsDNSOptionDesc which describes the
|
||||
* valid options
|
||||
*
|
||||
* Parses a DNS option in the form "name" or "name:number" and, if
|
||||
|
|
@ -3443,7 +3443,7 @@ validate_dns_option (const char *name, gboolean numeric, gboolean ipv6,
|
|||
gboolean
|
||||
_nm_utils_dns_option_validate (const char *option, char **out_name,
|
||||
long *out_value, gboolean ipv6,
|
||||
const DNSOptionDesc *option_descs)
|
||||
const NMUtilsDNSOptionDesc *option_descs)
|
||||
{
|
||||
char **tokens, *ptr;
|
||||
gboolean ret = FALSE;
|
||||
|
|
|
|||
|
|
@ -4228,7 +4228,7 @@ test_nm_utils_ascii_str_to_int64 (void)
|
|||
/******************************************************************************/
|
||||
|
||||
static void
|
||||
test_nm_utils_dns_option_validate_do (char *option, gboolean ipv6, const DNSOptionDesc *descs,
|
||||
test_nm_utils_dns_option_validate_do (char *option, gboolean ipv6, const NMUtilsDNSOptionDesc *descs,
|
||||
gboolean exp_result, char *exp_name, gboolean exp_value)
|
||||
{
|
||||
char *name;
|
||||
|
|
@ -4244,7 +4244,7 @@ test_nm_utils_dns_option_validate_do (char *option, gboolean ipv6, const DNSOpti
|
|||
g_free (name);
|
||||
}
|
||||
|
||||
static const DNSOptionDesc opt_descs[] = {
|
||||
static const NMUtilsDNSOptionDesc opt_descs[] = {
|
||||
/* name num ipv6 */
|
||||
{ "opt1", FALSE, FALSE },
|
||||
{ "opt2", TRUE, FALSE },
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ nm_ip4_config_capture_resolv_conf (GArray *nameservers,
|
|||
for (i = 0; i < read_options->len; i++) {
|
||||
const char *s = g_ptr_array_index (read_options, i);
|
||||
|
||||
if (_nm_utils_dns_option_validate (s, NULL, NULL, FALSE, dns_option_descs) &&
|
||||
if (_nm_utils_dns_option_validate (s, NULL, NULL, FALSE, _nm_utils_dns_option_descs) &&
|
||||
_nm_utils_dns_option_find_idx (dns_options, s) < 0) {
|
||||
g_ptr_array_add (dns_options, g_strdup (s));
|
||||
changed = TRUE;
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ nm_ip6_config_capture_resolv_conf (GArray *nameservers,
|
|||
for (i = 0; i < read_options->len; i++) {
|
||||
const char *s = g_ptr_array_index (read_options, i);
|
||||
|
||||
if (_nm_utils_dns_option_validate (s, NULL, NULL, TRUE, dns_option_descs) &&
|
||||
if (_nm_utils_dns_option_validate (s, NULL, NULL, TRUE, _nm_utils_dns_option_descs) &&
|
||||
_nm_utils_dns_option_find_idx (dns_options, s) < 0) {
|
||||
g_ptr_array_add (dns_options, g_strdup (s));
|
||||
changed = TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue