NetworkManager/src/libnmc-base
Thomas Haller 7df7d46bfe
cli: make nmc_string_to_ternary() more flexible
- use strstrip() to remove leading and trailing whitespace
- use _nm_utils_ascii_str_to_int64() for parsing numeric values
  like -1, 0 and 1. In particular, this now also allows passing
  the numeric values.
- also accept "default" as valid value for NM_TERNARY_DEFAULT.

With this change, nmc_string_to_ternary() can also parse everything that
we commonly and currently parse with _nm_utils_enum_from_str_full()
and NM_TYPE_TERNARY. This will allow to configure ternary values in
a more flexible way.
2021-05-03 10:11:21 +02:00
..
meson.build build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00
nm-client-utils.c cli: make nmc_string_to_ternary() more flexible 2021-05-03 10:11:21 +02:00
nm-client-utils.h cli: use const argument for nmc_string_is_valid() 2021-05-03 10:11:20 +02:00
nm-polkit-listener.c build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00
nm-polkit-listener.h build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00
nm-secret-agent-simple.c build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00
nm-secret-agent-simple.h build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00
nm-vpn-helpers.c build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00
nm-vpn-helpers.h build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00
qrcodegen.c build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00
qrcodegen.h build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00