]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: introduce network_config_source_from_string()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 1 Nov 2024 21:05:23 +0000 (06:05 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 4 Nov 2024 17:55:15 +0000 (02:55 +0900)
It is currently unused, but will be used later.
Preparation for later commits.

src/network/networkd-util.c
src/network/networkd-util.h

index 8d6df6d2c11a859699e79fed028258b320aa13c7..0a40d81edd6f159da15e05dc868d1a9a3da1fd67 100644 (file)
@@ -23,7 +23,7 @@ static const char * const network_config_source_table[_NETWORK_CONFIG_SOURCE_MAX
         [NETWORK_CONFIG_SOURCE_RUNTIME] = "runtime",
 };
 
-DEFINE_STRING_TABLE_LOOKUP_TO_STRING(network_config_source, NetworkConfigSource);
+DEFINE_STRING_TABLE_LOOKUP(network_config_source, NetworkConfigSource);
 
 int network_config_state_to_string_alloc(NetworkConfigState s, char **ret) {
         static const char* states[] = {
index 3d31bcfb197432d15a0ce0edc5387d4370a8c907..b424092ef643a92aa30f8343908081a8cbc745d9 100644 (file)
@@ -56,6 +56,7 @@ CONFIG_PARSER_PROTOTYPE(config_parse_ip_masquerade);
 CONFIG_PARSER_PROTOTYPE(config_parse_mud_url);
 
 const char* network_config_source_to_string(NetworkConfigSource s) _const_;
+NetworkConfigSource network_config_source_from_string(const char* s) _pure_;
 
 int network_config_state_to_string_alloc(NetworkConfigState s, char **ret);