mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-12 20:39:19 +02:00
config: support hex and octal numbers in nm_config_data_get_connection_default_int64()
This affects parsing global connection defaults from "NetworkManager.conf". Let's use a zero base for strtoll(), which honors the prefixes "0x" and "0" to use hex and octal numbers, respectively. Otherwise it uses decimal (base 10). This causes very little ambiguity, but it makes certain numbers just work. Also, we have flags properties, where it makes much more sense to write them in hex, like `connection.mptcp-flags=0x52`.
This commit is contained in:
parent
6fb11dbe77
commit
9f0f8e0fbe
1 changed files with 1 additions and 1 deletions
|
|
@ -1688,7 +1688,7 @@ nm_config_data_get_connection_default_int64(const NMConfigData *self,
|
|||
const char *value;
|
||||
|
||||
value = nm_config_data_get_connection_default(self, property, device);
|
||||
return _nm_utils_ascii_str_to_int64(value, 10, min, max, fallback);
|
||||
return _nm_utils_ascii_str_to_int64(value, 0, min, max, fallback);
|
||||
}
|
||||
|
||||
static const char *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue