]> git.ozlabs.org Git - petitboot/commit
protocol: Separate device add from boot-option add messages
authorJeremy Kerr <jk@ozlabs.org>
Mon, 11 Mar 2013 05:43:48 +0000 (13:43 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 16 Apr 2013 03:41:46 +0000 (11:41 +0800)
commitbd06734362bb727b09b943688d9b69aa0a84590d
tree476072cae1d0d28b286928c5fba589bde4a2d9aa
parentb838cf777ed3d21b166f8daddd4b11fc75e07307
protocol: Separate device add from boot-option add messages

We want to cater for situations where boot options may be discovered
some time after we get notificiation about devices. For instance,
discovering boot options from DHCP configuration parameters. In this
case, we'll need to notify UIs of boot options appear some time after
the device (and/or other boot options on the same device) has appeared.

This change adds a new protocol message type,
PB_PROTOCOL_ACTION_BOOT_OPTION_ADD. We also rename
PB_PROTOCOL_ACTION_ADD to make it clear that it is just for devices.

The discover server is updated to send boot option add events at device
discover time, but we are now able to decouple this later.

We also update the clients to handle the boot option add events
separately.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
12 files changed:
discover/device-handler.c
discover/discover-server.c
discover/discover-server.h
discover/event-parser.c
lib/pb-protocol/pb-protocol.c
lib/pb-protocol/pb-protocol.h
lib/types/types.h
ui/common/discover-client.c
ui/common/discover-client.h
ui/ncurses/nc-cui.c
ui/twin/pbt-client.c
ui/twin/pbt-menu.h