]> git.ozlabs.org Git - petitboot/commitdiff
discover/platform: rename finalise_config hook
authorJeremy Kerr <jk@ozlabs.org>
Tue, 27 Jan 2015 06:38:55 +0000 (14:38 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 16 Feb 2015 02:24:22 +0000 (10:24 +0800)
We want to expand the finalise_config hook to cover generic pre-boot
functionality, so rename to pre_boot.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/device-handler.c
discover/platform-powerpc.c
discover/platform.c
discover/platform.h

index fd6f1d3091618f64e1a309817b7c2e28923c0b38..5d9f98892eb792db789de351fb750bb95cd0e3f9 100644 (file)
@@ -843,7 +843,7 @@ void device_handler_boot(struct device_handler *handler,
        if (handler->pending_boot)
                boot_cancel(handler->pending_boot);
 
-       platform_finalise_config();
+       platform_pre_boot();
 
        handler->pending_boot = boot(handler, opt, cmd, handler->dry_run,
                        boot_status, handler);
index 0440eb4d5d0e78a03e67f3f3d2ae6076bd40c2d5..f6a78a9e52a276dc847f1401173d3ffe5b99afbb 100644 (file)
@@ -832,7 +832,7 @@ static int save_config(struct platform *p, struct config *config)
        return rc;
 }
 
-static void finalise_config(struct platform *p, const struct config *config)
+static void pre_boot(struct platform *p, const struct config *config)
 {
        struct platform_powerpc *platform = to_platform_powerpc(p);
 
@@ -905,7 +905,7 @@ static struct platform platform_powerpc = {
        .probe                  = probe,
        .load_config            = load_config,
        .save_config            = save_config,
-       .finalise_config        = finalise_config,
+       .pre_boot               = pre_boot,
        .get_sysinfo            = get_sysinfo,
 };
 
index 7275a5f0982f4d89143b5f3b4acf63aad3801b57..04798ac8a4912e12e1f81a601f4eaaae8b1012c5 100644 (file)
@@ -180,12 +180,12 @@ const struct platform *platform_get(void)
        return platform;
 }
 
-void platform_finalise_config(void)
+void platform_pre_boot(void)
 {
        const struct config *config = config_get();
 
-       if (platform && config && platform->finalise_config)
-               platform->finalise_config(platform, config);
+       if (platform && config && platform->pre_boot)
+               platform->pre_boot(platform, config);
 }
 
 int platform_get_sysinfo(struct system_info *info)
index ab1bd8868d4a40cad1de38bab4cf5f7cebec3dcf..5aa8e3f9dcc8a82189af51382f9ee2ffbd6178e7 100644 (file)
@@ -8,7 +8,7 @@ struct platform {
        bool            (*probe)(struct platform *, void *);
        int             (*load_config)(struct platform *, struct config *);
        int             (*save_config)(struct platform *, struct config *);
-       void            (*finalise_config)(struct platform *,
+       void            (*pre_boot)(struct platform *,
                                const struct config *);
        int             (*get_sysinfo)(struct platform *, struct system_info *);
        uint16_t        dhcp_arch_id;
@@ -19,7 +19,7 @@ int platform_init(void *ctx);
 int platform_fini(void);
 const struct platform *platform_get(void);
 int platform_get_sysinfo(struct system_info *info);
-void platform_finalise_config(void);
+void platform_pre_boot(void);
 
 /* configuration interface */
 const struct config *config_get(void);