summaryrefslogtreecommitdiffstats
path: root/ui
Commit message (Collapse)AuthorAgeFilesLines
* discover: Consolidate user events by device IDJeremy Kerr2013-04-161-0/+18
| | | | | | | | | | Currently, we assume all user events are for a new device. This means that we can never add boot options to an existing device. This change tries to find an existing (matching by ID) device before creating a new one in the user event add path. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* protocol: Separate device add from boot-option add messagesJeremy Kerr2013-04-165-115/+141
| | | | | | | | | | | | | | | | | | | | 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>
* pb-protocol: Don't allocate in deserialise functionsJeremy Kerr2013-04-161-2/+5
| | | | | | | | | | | | | Curently, the protocol deserialise functions are allocating device and boot_command structures. This (implicitly) makes them responsible for initialisation of these structures too. Rather that making the protocol responsible for initialising the devices and boot commands, this change gives the deserialise functions an argument to an already-instanciated structure. This means that the creation is no longer implied by the deserialise. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ncurses: Fix build warningGeoff Levand2013-04-151-0/+1
| | | | | | | | Add missing header include. Fixes this warning: ui/ncurses/nc-cui.c: warning: implicit declaration of function 'pb_protocol_device_cmp' Signed-off-by: Geoff Levand <geoff@infradead.org>
* Move --dry-run option to discover serverJeremy Kerr2013-04-158-27/+9
| | | | | | | Now that the server does the booting, we should move the --dry-run argument to the server. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Move boot to discover serverJeremy Kerr2013-04-1511-545/+12
| | | | | | | | | | | | | | | | | | | | | This change moves the boot-via-kexec functionality from the UIs to the discover server. On the UI side: rather than run kexec directly, we just send a message to the discover server. Because this is generic discover client functionality, we no longer need the boot callbacks in the twin- and ncurses-specific code. We also remove the kexec and URL-loading code from the UIs, and add it to the discover server code, in paths.c. We expose this to the server though a new function: load_path(void *, const char *, unsigned int *); On the server side, we simply move hook up the boot() function to use the load_file and kexec calls. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/url: Move URL-handling code to libJeremy Kerr2013-04-154-284/+2
| | | | | | | We'll need to use the URL handling code in the server, so move it to the lib/ directory. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add discover client to struct cuiJeremy Kerr2013-04-152-5/+5
| | | | | | .. we'll need it later. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover-client: interact directly with waitsetJeremy Kerr2013-04-155-80/+55
| | | | | | | | | | | | | | Currently, clients need to mess with the discover client fd directly, and manually register the waiter. Instead, this change adds a waitset parameter to discover_client_register, so that the discover client can register itself, and call discover_client_process directly. This means no proxy handlers, and no casts to waiter callbacks. We can also get rid of discover_client_get_fd. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover-client: Add discover_client_bootJeremy Kerr2013-04-153-6/+55
| | | | | | | | This change implements the client side of the server-based boot interface. We add a funcion, discover_client_boot, which serialises a boot message, then sends it to the server. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui: callback & boot actions: kexec -> bootJeremy Kerr2013-04-159-33/+33
| | | | | | | | | find ui/ -type f | xargs sed -i -e s/kexec_cb/boot_cb/g \ -e s/on_kexec/on_boot/g \ -e s/run_kexec/boot/g Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui: pb_kexec_data -> pb_boot_dataJeremy Kerr2013-04-1510-77/+77
| | | | | | | | find ui/ -type f | xargs sed -i -e s/pb_kexec_data/pb_boot_data/g \ -e 's/\<kd\>/bd/g' Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: ked -> boot-editorJeremy Kerr2013-04-157-386/+408
| | | | | | | | | | git mv ui/ncurses/nc-ked.c ui/ncurses/nc-boot-editor.c git mv ui/ncurses/nc-ked.h ui/ncurses/nc-boot-editor.h find ui/ncurses -type f | xargs sed -i -e s/nc-ked\./nc-boot-editor./g \ -e s/ked/boot_editor/g Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/common: Remove unused artworkJeremy Kerr2013-04-104-3/+0
| | | | | | | | | | | | A few of the oxygen icons are no longer used, so remove them from the artwork tree. Coincidentally, this fixes and issue with `make dist`, as the drive-removable-media-usb-pendrive.png file is too long (when used with an autogenerated git version string) to be tar-ed up. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* waiter: Don't rely on global variables to keep waiter stateJeremy Kerr2013-04-107-16/+29
| | | | | | | | | Rather than defining the set of waiters (and pollfds) in waiter.c, add a struct waitset to contain these. A waitset is created with waitset_create, which is passed to the waiter_* functions. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* lib/types: Create common file for type definitionsJeremy Kerr2013-04-106-5/+9
| | | | | | | | | | | | The device and boot_option types are defined in pb-protocol.h, but aren't really specific to the procotol. This means a lot of non-messaging-related files are #including the protocol definitions unnecessarily. This change separates the types out into lib/types/types.h. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/common/url: Fix multiple-preceeding-slash on pathnamesJeremy Kerr2013-03-061-0/+5
| | | | | | | Fix the double-slash URL test. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/common/url: Add pb_url_scheme_nameJeremy Kerr2013-03-062-0/+13
| | | | | | | | Add a function to lookup the name of a scheme, for more useful URL output. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/common/url: remove scheme separator from URL scheme definitionsJeremy Kerr2013-03-061-20/+35
| | | | | | | To make the scheme definitions more useful for other functions. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/common/url: move pb_scheme_info array to file scopeJeremy Kerr2013-03-061-16/+15
| | | | | | | | We'd like to use the scheme info array for other functions, so move it to file scope, and rename to schemes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/twin: fix compiler warningsJeremy Kerr2013-03-051-2/+2
| | | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/ncurses: Fix warning from unnecessary if statementJeremy Kerr2013-03-051-1/+1
| | | | | | | | ui/ncurses/nc-menu.c: In function 'pmenu_process_key': ui/ncurses/nc-menu.c:207:33: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* nc: Only expand debug macros if DEBUG is definedJeremy Kerr2013-03-051-0/+6
| | | | | | | To reduce debugging output from the UI Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* Fix sftp loaderGeoff Levand2012-04-021-6/+5
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Increase X screen sizeGeoff Levand2012-03-302-3/+4
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Speed up --start-daemon optionGeoff Levand2012-03-302-10/+10
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Cleanup --dry-run option codeGeoff Levand2012-03-307-26/+29
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add UI option --dry-runGeoff Levand2012-03-278-39/+53
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Log to stderr, allow --log=-Geoff Levand2012-03-264-16/+28
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Fixup artwork licensesGeoff Levand2012-03-0918-11/+241
| | | | | | | Replace icon files with files from KDE 4.3 Oxygen. Add artwork license info. Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add --start-daemon option to ui programsGeoff Levand2012-03-0811-26/+101
| | | | | | | | Add the option --start-daemon to automatically start pb-discover if it is not already started. For use when running as a stand-alone app. Signed-off-by: Geoff Levand <geoff@infradead.org>
* Log file cleanupsGeoff Levand2012-03-084-10/+11
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Rename pb-nc, pb-twin to petitboot-nc, petitboot-twinGeoff Levand2012-03-082-14/+14
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Move installed programs from bin to sbinGeoff Levand2012-02-242-4/+4
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Update twin ui to use discover serverGeoff Levand2012-02-1512-1200/+2708
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Remove union in pb_opt_dataGeoff Levand2012-02-151-4/+2
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Minor include path fixGeoff Levand2012-02-151-1/+1
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Rename pb-nc-generic to pb-ncGeoff Levand2012-02-151-3/+3
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Remove unused file pb-cui.cGeoff Levand2012-02-151-289/+0
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Fixups for 'make dist'Geoff Levand2012-02-121-11/+3
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add artwork files network.png, system.pngGeoff Levand2012-02-123-8/+8
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Rename ps3-cui.c to ps3-main.cGeoff Levand2012-02-121-0/+0
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Convert build to use automakeGeoff Levand2012-02-125-0/+245
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add generic ncurses programGeoff Levand2012-02-121-0/+289
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Rename pb-test.c to discover-test.cGeoff Levand2012-02-121-0/+0
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Move artwork from ui/twin to ui/commonGeoff Levand2011-11-136-0/+0
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Remove KEY_LEFT in nc-menuGeoff Levand2011-11-121-1/+0
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add data structs to ui-systemGeoff Levand2011-10-301-0/+21
|
* cui: Remove tab hotkeyGeoff Levand2009-08-261-1/+0
| | | | | | Remove the 'tab' hotkey that was used for kboot compatability. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Fix seg fault on ps3 flash errorGeoff Levand2009-08-252-6/+5
| | | | Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
OpenPOWER on IntegriCloud