Rename pb-test.c to discover-test.c Signed-off-by: Geoff Levand <geoff@infradead.org>
Revert const device in discover_client_ops Make the device structure passed to the discover_client_ops callbacks writable. Commit 2b42cdd35ccd83c52e9df257efdfcda040d170d9 (Make client ops constant) changed the discover_client_ops callback routine arguments to be pointers to const device structures. Typically, the callback routines will initialize and destroy the device.ui_info and boot_option.info variables, so the device instance must be writable by the callback routines. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Rename client add remove ops For consistency, rename the symbols add_device and remove_device to device_add and device_remove. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Pass cb_arg to discover_client_init Pass the client cb_arg to discover_client_init() and have it initialize the structure member. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
[discover client] Make devices persistent Change discover client to keep devices around after they've been added, and freed after removal. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Make client ops constant Make the discover_client_ops args read-only. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Add client ops instance arg Add a user supplied agument to the struct discover_client_ops callback routines that is suitable for managing client instance data. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Use a list for device->boot_options Makes adding and removing options easier for parsers. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Remove reference to device.h It isn't needed anymore. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Remove const from print_device_remove ..we can add consts where suitable later. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Don't print pid on ui test startup Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Initial support for multiple UIs Move the device discovery code from separate udev helpers to a single process to listen on two sockets: one SOCK_DGRAM for incoming udev events, and one SOCK_STREAM for UIs to connect. Initial support for client/server infrastructure, still need to wire-up the udev messages. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>