build-sys: fix the script used for generating load_fragment_gperf_nulstr (#6646)

This prevents `systemd --dump-configuration-items` from crashing.
Closes #6596.
This commit is contained in:
Evgeny Vereshchagin
2017-08-26 23:21:23 +09:00
committed by Yu Watanabe
parent dd5f3175b7
commit 0c700d392d
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ BEGIN{
print "const char load_fragment_gperf_nulstr[] ="
}
keyword==1 {
print "\"" $$1 "\\0\""
print "\"" $1 "\\0\""
}
/%%/ {
keyword=1
+5
View File
@@ -841,6 +841,10 @@ static void test_config_parse_pass_environ(void) {
}
static void test_unit_dump_config_items(void) {
unit_dump_config_items(stdout);
}
int main(int argc, char *argv[]) {
_cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL;
int r;
@@ -863,6 +867,7 @@ int main(int argc, char *argv[]) {
test_load_env_file_4();
test_load_env_file_5();
TEST_REQ_RUNNING_SYSTEMD(test_install_printf());
test_unit_dump_config_items();
return r;
}