From e4f5bd235894c11823ac1befe8c8c43063cad026 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Thu, 14 Mar 2013 14:18:54 +0800 Subject: discover: Introduce a container type for boot options This change introduces a new type, struct discover_boot_option. Like struct discover_device adds discover-specific data to struct device, struct discover_boot_option allows the discover server to store more than just the boot option strings for a boot option. Signed-off-by: Jeremy Kerr --- discover/discover-server.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'discover/discover-server.c') diff --git a/discover/discover-server.c b/discover/discover-server.c index 9f6e7da..1987932 100644 --- a/discover/discover-server.c +++ b/discover/discover-server.c @@ -200,14 +200,15 @@ static int discover_server_process_connection(void *arg) /* send existing devices to client */ n_devices = device_handler_get_device_count(server->device_handler); for (i = 0; i < n_devices; i++) { - const struct device *device; - struct boot_option *opt; + const struct discover_boot_option *opt; + const struct discover_device *device; device = device_handler_get_device(server->device_handler, i); - write_device_add_message(server, client, device); + write_device_add_message(server, client, device->device); list_for_each_entry(&device->boot_options, opt, list) - discover_server_notify_boot_option_add(server, opt); + discover_server_notify_boot_option_add(server, + opt->option); } -- cgit v1.2.1