core: add nm_utils_ascii_str_to_bool()
This is effectively the same as nm_config_parse_boolean(). The difference is, that "nm-config.c" is not available to the interface-helper, thus any code used by interface-helper (like "NetworkManager.c") cannot use this function. Still don't drop nm_config_parse_boolean() entirely, because it's better to have the explicit notion of parsing a string in the config-context. I ended up not using the function. But I'd still keep this patch.
This commit is contained in:
@@ -114,6 +114,11 @@ gboolean nm_utils_error_is_cancelled (GError *error,
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
gint nm_utils_ascii_str_to_bool (const char *str,
|
||||
gint default_value);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
gboolean nm_ethernet_address_is_valid (gconstpointer addr, gssize len);
|
||||
|
||||
in_addr_t nm_utils_ip4_address_clear_host_address (in_addr_t addr, guint8 plen);
|
||||
|
Reference in New Issue
Block a user