proc-cmdline: introduce PROC_CMDLINE_TRUE_WHEN_MISSING
This commit is contained in:
@@ -180,6 +180,7 @@ TEST(proc_cmdline_get_bool) {
|
||||
|
||||
assert_se(proc_cmdline_get_bool("", /* flags = */ 0, &value) == -EINVAL);
|
||||
assert_se(proc_cmdline_get_bool("abc", /* flags = */ 0, &value) == 0 && value == false);
|
||||
assert_se(proc_cmdline_get_bool("unspecified", PROC_CMDLINE_TRUE_WHEN_MISSING, &value) == 0 && value == true);
|
||||
assert_se(proc_cmdline_get_bool("foo_bar", /* flags = */ 0, &value) > 0 && value == true);
|
||||
assert_se(proc_cmdline_get_bool("foo-bar", /* flags = */ 0, &value) > 0 && value == true);
|
||||
assert_se(proc_cmdline_get_bool("bar-waldo", /* flags = */ 0, &value) > 0 && value == true);
|
||||
|
||||
Reference in New Issue
Block a user