summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-10-22 14:24:52 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-10-22 14:24:52 -0400
commit96287a491676763849ab73bda6c4486d7f775323 (patch)
treeffb02b5ba56b13630343a7c734ca1c2c98dd51e4 /src/test
parent863a5610c7336829d76252375dbe361fd6813a7c (diff)
tree-wide: allow state to be passed through to parse_proc_cmdline_item
No functional change.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-proc-cmdline.c7
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) {