From 71da0c6cb80e3708213a08c06e71f099534bcd2a Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Wed, 23 Jul 2014 14:20:12 +0800 Subject: discover: Add debug flag to config This change adds a debug flag to the config, and groups it under not-user-modifiable parts of struct config. This means we no longer need the pb-sysinfo helper, as the last remaining function (--debug-enabled) can be implemented with pb-config. Signed-off-by: Jeremy Kerr --- discover/platform-powerpc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'discover/platform-powerpc.c') diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c index 2ce69e7..98dc045 100644 --- a/discover/platform-powerpc.c +++ b/discover/platform-powerpc.c @@ -36,6 +36,7 @@ static const char *known_params[] = { "petitboot,network", "petitboot,timeout", "petitboot,bootdev", + "petitboot,debug?", NULL, }; @@ -424,6 +425,11 @@ static void populate_config(struct platform_powerpc *platform, populate_network_config(platform, config); populate_bootdev_config(platform, config); + + if (!config->debug) { + val = get_param(platform, "petitboot,debug?"); + config->debug = val && !strcmp(val, "true"); + } } static char *iface_config_str(void *ctx, struct interface_config *config) -- cgit v1.2.1