diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2014-07-23 14:20:12 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-08-05 12:42:18 +0800 |
commit | 71da0c6cb80e3708213a08c06e71f099534bcd2a (patch) | |
tree | e8327fd499bebdfb54a38a8f544f8079936bf806 /discover/platform-powerpc.c | |
parent | 6897abaa97a02e0ab8ac07209a5e4966bfe101c5 (diff) | |
download | petitboot-71da0c6cb80e3708213a08c06e71f099534bcd2a.zip petitboot-71da0c6cb80e3708213a08c06e71f099534bcd2a.tar.gz |
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 <jk@ozlabs.org>
Diffstat (limited to 'discover/platform-powerpc.c')
-rw-r--r-- | discover/platform-powerpc.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) |