]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: Fix setting StatusUnitFormat from config files
authorMaciej Stanczew <maciej.stanczew@gmail.com>
Mon, 16 Sep 2019 00:09:35 +0000 (02:09 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Sep 2019 06:21:21 +0000 (15:21 +0900)
src/core/load-fragment.c
src/core/load-fragment.h
src/core/main.c

index a7951a57579e56d2c78b1d90c3c24561e2957a5e..56cad2f7b8292b0f2e501abd1e90e3624374cc46 100644 (file)
@@ -133,6 +133,7 @@ DEFINE_CONFIG_PARSE_PTR(config_parse_cg_weight, cg_weight_parse, uint64_t, "Inva
 DEFINE_CONFIG_PARSE_PTR(config_parse_cpu_shares, cg_cpu_shares_parse, uint64_t, "Invalid CPU shares");
 DEFINE_CONFIG_PARSE_PTR(config_parse_exec_mount_flags, mount_propagation_flags_from_string, unsigned long, "Failed to parse mount flag");
 DEFINE_CONFIG_PARSE_ENUM_WITH_DEFAULT(config_parse_numa_policy, mpol, int, -1, "Invalid NUMA policy type");
+DEFINE_CONFIG_PARSE_ENUM(config_parse_status_unit_format, status_unit_format, StatusUnitFormat, "Failed to parse status unit format");
 
 int config_parse_unit_deps(
                 const char *unit,
index 664643f08ec25e9717463d022c4e4b65a0e22fe1..1183987d7d8f095f8d9c1a30bbe67553680c8400 100644 (file)
@@ -117,6 +117,7 @@ CONFIG_PARSER_PROTOTYPE(config_parse_numa_mask);
 CONFIG_PARSER_PROTOTYPE(config_parse_ip_filter_bpf_progs);
 CONFIG_PARSER_PROTOTYPE(config_parse_cpu_affinity2);
 CONFIG_PARSER_PROTOTYPE(config_parse_show_status);
+CONFIG_PARSER_PROTOTYPE(config_parse_status_unit_format);
 CONFIG_PARSER_PROTOTYPE(config_parse_output_restricted);
 CONFIG_PARSER_PROTOTYPE(config_parse_crash_chvt);
 CONFIG_PARSER_PROTOTYPE(config_parse_timeout_abort);
index bcce7178a8ef4ea03794865493c5b53482d146c8..4633184b79ad8b75e7633e0f7ff7b5966b92ab8b 100644 (file)
@@ -538,7 +538,6 @@ DEFINE_SETTER(config_parse_level2, log_set_max_level_from_string, "log level");
 DEFINE_SETTER(config_parse_target, log_set_target_from_string, "target");
 DEFINE_SETTER(config_parse_color, log_show_color_from_string, "color" );
 DEFINE_SETTER(config_parse_location, log_show_location_from_string, "location");
-DEFINE_SETTER(config_parse_status_unit_format, status_unit_format_from_string, "value");
 
 static int parse_config_file(void) {