ui/ncurses: Receive config messages
authorJeremy Kerr <jk@ozlabs.org>
Fri, 18 Oct 2013 03:45:03 +0000 (11:45 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Wed, 13 Nov 2013 10:41:45 +0000 (21:41 +1100)
We just store the config in the cui for now.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses/nc-cui.c
ui/ncurses/nc-cui.h

index 5f411963d0b10ed28c92aab472935b2c8aaa91f7..6aa2a2869cf0b971c9e41fd6684cf4ba1f5838c5 100644 (file)
@@ -530,12 +530,19 @@ static void cui_update_sysinfo(struct system_info *sysinfo, void *arg)
        cui_update_mm_title(cui);
 }
 
+static void cui_update_config(struct config *config, void *arg)
+{
+       struct cui *cui = cui_from_arg(arg);
+       cui->config = talloc_steal(cui, config);
+}
+
 static struct discover_client_ops cui_client_ops = {
        .device_add = NULL,
        .boot_option_add = cui_boot_option_add,
        .device_remove = cui_device_remove,
        .update_status = cui_update_status,
        .update_sysinfo = cui_update_sysinfo,
+       .update_config = cui_update_config,
 };
 
 /**
index d1edd795fbd7e8d057ca59ac8ff6394aa268a0f2..0e3708dd80ca4451c45b66dc95e68b93af40895e 100644 (file)
@@ -57,6 +57,7 @@ struct cui {
        struct discover_client *client;
        struct system_info *sysinfo;
        struct sysinfo_screen *sysinfo_screen;
+       struct config *config;
        struct pjs *pjs;
        void *platform_info;
        unsigned int default_item;