diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-10-22 20:24:52 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-10-22 20:24:52 +0200 |
commit | 96287a491676763849ab73bda6c4486d7f775323 (patch) | |
tree | ffb02b5ba56b13630343a7c734ca1c2c98dd51e4 /src/test/test-proc-cmdline.c | |
parent | journald: systemd.journald.max_level_* kernel command line options (#4427) (diff) | |
download | systemd-96287a491676763849ab73bda6c4486d7f775323.tar.xz systemd-96287a491676763849ab73bda6c4486d7f775323.zip |
tree-wide: allow state to be passed through to parse_proc_cmdline_item
No functional change.
Diffstat (limited to 'src/test/test-proc-cmdline.c')
-rw-r--r-- | src/test/test-proc-cmdline.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/test-proc-cmdline.c b/src/test/test-proc-cmdline.c index 80ad5ed98b..e4207935c4 100644 --- a/src/test/test-proc-cmdline.c +++ b/src/test/test-proc-cmdline.c @@ -25,15 +25,18 @@ #include "string-util.h" #include "util.h" -static int parse_item(const char *key, const char *value) { +static int obj; + +static int parse_item(const char *key, const char *value, void *data) { assert_se(key); + assert_se(data == &obj); log_info("kernel cmdline option <%s> = <%s>", key, strna(value)); return 0; } static void test_parse_proc_cmdline(void) { - assert_se(parse_proc_cmdline(parse_item) >= 0); + assert_se(parse_proc_cmdline(parse_item, &obj) >= 0); } static void test_runlevel_to_target(void) { |