X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=discover%2Fplatform.c;h=8ce52fc8c539f8d567581822bc487f1e266121ad;hb=refs%2Ftags%2Fv1.10.1;hp=767f66e6fa41c4b25135287dacdff288a73e0677;hpb=6fe83028cc8de0954e81bede58115c18ec29b040;p=petitboot diff --git a/discover/platform.c b/discover/platform.c index 767f66e..8ce52fc 100644 --- a/discover/platform.c +++ b/discover/platform.c @@ -153,7 +153,7 @@ void config_set_defaults(struct config *config) config->debug = config_debug_on_cmdline(); lang = setlocale(LC_ALL, NULL); - pb_log("lang: %s\n", lang); + pb_log_fn("lang: %s\n", lang); if (lang && strlen(lang)) config->lang = talloc_strdup(config, lang); else @@ -213,6 +213,19 @@ int platform_get_sysinfo(struct system_info *info) return -1; } +bool platform_restrict_clients(){ + if (platform && platform->restrict_clients) + return platform->restrict_clients(platform); + return false; +} + +int platform_set_password(const char *hash) +{ + if (platform && platform->set_password) + return platform->set_password(platform, hash); + return -1; +} + int config_set(struct config *newconfig) { int rc; @@ -455,7 +468,7 @@ static int read_bootdev(void *ctx, char **pos, struct autoboot_option *opt) return rc; } -static void config_populate_bootdev(struct config *config, +void config_populate_bootdev(struct config *config, const struct param_list *pl) { struct autoboot_option *opt, *new = NULL;