diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2014-09-18 22:13:27 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-09-18 22:25:45 +0800 |
commit | f072619a006217503a7a2b4262acd52c247f1113 (patch) | |
tree | cb4f48921a37652749d28a8239df395c350ce60d /discover/platform-powerpc.c | |
parent | 29f9a3a7e503f731fe891d21bedf29c08a20383f (diff) | |
download | petitboot-f072619a006217503a7a2b4262acd52c247f1113.zip petitboot-f072619a006217503a7a2b4262acd52c247f1113.tar.gz |
discover/platform-powerpc: Read language configuration from NVRAM
Implement load & save of the petitboot language configuration.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/platform-powerpc.c')
-rw-r--r-- | discover/platform-powerpc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c index 642c93c..1f6f725 100644 --- a/discover/platform-powerpc.c +++ b/discover/platform-powerpc.c @@ -37,6 +37,7 @@ static const char *known_params[] = { "petitboot,network", "petitboot,timeout", "petitboot,bootdev", + "petitboot,language", "petitboot,debug?", NULL, }; @@ -423,6 +424,9 @@ static void populate_config(struct platform_powerpc *platform, } } + val = get_param(platform, "petitboot,language"); + config->lang = val ? talloc_strdup(config, val) : NULL; + populate_network_config(platform, config); populate_bootdev_config(platform, config); @@ -555,6 +559,9 @@ static int update_config(struct platform_powerpc *platform, if (tmp) talloc_free(tmp); + val = config->lang ?: ""; + update_string_config(platform, "petitboot,language", val); + update_network_config(platform, config); update_bootdev_config(platform, config); |