From: Jeremy Kerr Date: Wed, 2 Apr 2014 07:15:22 +0000 (+0800) Subject: ui/common: associate boot options with devices X-Git-Tag: v1.0.0~205 X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=commitdiff_plain;h=16ab363fe5bc4393b5dd7b9c12bbd6e5b55a22fe 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 --- 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);