discover: Add 'sync' user event Add a user event named 'sync' that causes the discover server to merge the devicemapper snapshots of mounted devices. This is particularly useful as a debug aid (for example, when copying logs to a USB device), as the server will otherwise only sync changes to mounted devices in response to parser actions. The command can be called as pb-event sync@device to sync a particular device, or as pb-event sync@all to sync all devices with snapshots. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
pb-event: Add 'boot' user event Add a user event to send a boot command to the discover server. The format of the boot command is similar to the add command, eg: pb-event boot@eth0 image="http://host/image" initrd="http://host/initrd" and also recognises "id", "dtb", and "args" arguments. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
configure: Use AC_GNU_SOURCE Rather than #defining _GNU_SOURCE in our .c files, we can define this from config.h instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
pb-event: move send code to a separate function Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
utils/pb-event: handle event data on command line It'd be nice to avoid using printf just for the \0 characters, so allow parsing events from the command line. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Convert echo to printf in scripts Signed-off-by: Geoff Levand <geoff@infradead.org>
pb-event: Add help message
Add pb-event helper utility Add a new helper utility pb_event. pb_event reads data on stdin and writes it to the petitboot event socket. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>