From 16ab363fe5bc4393b5dd7b9c12bbd6e5b55a22fe Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Wed, 2 Apr 2014 15:15:22 +0800 Subject: [PATCH] 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 --- ui/common/discover-client.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.39.2