]> git.ozlabs.org Git - petitboot/blobdiff - discover/platform.c
discover: Recognise and open LUKS encrypted partitions
[petitboot] / discover / platform.c
index 767f66e6fa41c4b25135287dacdff288a73e0677..8ce52fc8c539f8d567581822bc487f1e266121ad 100644 (file)
@@ -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;