summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-04-02 15:15:22 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-04-02 15:15:22 +0800
commit16ab363fe5bc4393b5dd7b9c12bbd6e5b55a22fe (patch)
tree35def3c888da2e079e147a51485606fd16565795 /ui
parent85bd33ca9777c386359b9b3899888316354a4e1f (diff)
downloadtalos-petitboot-16ab363fe5bc4393b5dd7b9c12bbd6e5b55a22fe.tar.gz
talos-petitboot-16ab363fe5bc4393b5dd7b9c12bbd6e5b55a22fe.zip
ui/common: associate boot options with devices
The discover client isn't currently associating boot options with their devices. This change adds appropriate device list management. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/common/discover-client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/common/discover-client.c b/ui/common/discover-client.c
index fbf70ba..a124f8b 100644
--- a/ui/common/discover-client.c
+++ b/ui/common/discover-client.c
@@ -60,6 +60,7 @@ static void device_add(struct discover_client *client, struct device *device)
client->devices[client->n_devices - 1] = device;
talloc_steal(client, device);
+ list_init(&device->boot_options);
if (client->ops.device_add)
client->ops.device_add(device, client->ops.cb_arg);
@@ -77,6 +78,7 @@ static void boot_option_add(struct discover_client *client,
assert(dev);
talloc_steal(dev, opt);
+ list_add(&dev->boot_options, &opt->list);
if (client->ops.boot_option_add)
client->ops.boot_option_add(dev, opt, client->ops.cb_arg);
OpenPOWER on IntegriCloud