summaryrefslogtreecommitdiffstats
path: root/ui/common
Commit message (Collapse)AuthorAgeFilesLines
* Makefiles: remove -I$(includedir)Jeremy Kerr2013-05-071-1/+0
| | | | | | | | | | | Currently, we include the system include dir in some of our makefiles; this is causing build problems when cross-compiling, as the system include dir may not contain files for the host. The compiler should be searing in the proper system include dir, so just remove the redundant -I. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui: Receive boot status messagesJeremy Kerr2013-05-062-0/+20
| | | | | | | | Add support in the discover client code to handle boot status messages, and pass them to the UI thorugh a new callback ("update_status") in the client_ops. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* protocol: Separate device add from boot-option add messagesJeremy Kerr2013-04-162-4/+52
| | | | | | | | | | | | | | | | | | | | 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>
* Move boot to discover serverJeremy Kerr2013-04-155-481/+0
| | | | | | | | | | | | | | | | | | | | | 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>
* discover-client: interact directly with waitsetJeremy Kerr2013-04-152-57/+46
| | | | | | | | | | | | | | 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-152-3/+3
| | | | | | | | | 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-152-12/+12
| | | | | | | | 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/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>
* lib/types: Create common file for type definitionsJeremy Kerr2013-04-102-2/+4
| | | | | | | | | | | | 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>
* Fix sftp loaderGeoff Levand2012-04-021-6/+5
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Cleanup --dry-run option codeGeoff Levand2012-03-302-10/+9
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add UI option --dry-runGeoff Levand2012-03-272-12/+13
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Fixup artwork licensesGeoff Levand2012-03-0915-6/+236
| | | | | | | 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-083-8/+33
| | | | | | | | 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>
* 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>
* Add artwork files network.png, system.pngGeoff Levand2012-02-123-8/+8
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Convert build to use automakeGeoff Levand2012-02-121-0/+63
| | | | 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>
* Add data structs to ui-systemGeoff Levand2011-10-301-0/+21
|
* Fix seg fault on ps3 flash errorGeoff Levand2009-08-252-6/+5
| | | | Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Fix minor typo in discover-client file descriptor checkGeoff Levand2009-08-031-1/+1
| | | | Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Delete kexec temporary files before rebootingGeoff Levand2009-07-093-26/+81
| | | | Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add ncurses joystick supportGeoff Levand2009-07-092-0/+153
| | | | Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add PS3 reset default optionGeoff Levand2009-07-092-6/+6
| | | | | | Add a --reset-defaults option to the PS3 CUI program. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add PS3 countdown timerGeoff Levand2009-07-092-12/+37
| | | | | | Add countdown timer support to the PS3 UI programs. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add generic UI countdown timerGeoff Levand2009-07-092-0/+181
| | | | | | Add support for a generic petitboot UI countdown timer. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Simplify kexecGeoff Levand2009-07-091-14/+14
| | | | | | Simplify the pb_run_kexec() routine. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Fix kexec callGeoff Levand2009-07-091-8/+15
| | | | | | | Fix the preparation of kexec call args. kexec wants the param and value in the same arg. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Quiet wgetGeoff Levand2009-07-091-6/+9
| | | | | | Add the --quiet option to wget for non-debug builds. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add ui-system helper routinesGeoff Levand2009-06-303-1/+199
| | | | | | | | | | | | Add some UI system helper routines: pb_run_kexec() pb_elf_hash() pb_cat_hash() pb_opt_hash() Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add remote file loading routinesGeoff Levand2009-06-302-0/+325
| | | | | | | | Create the new files loader.h and loader.c for loading remote file specifed by its URL. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add URL parsing routinesGeoff Levand2009-06-302-0/+248
| | | | | | | | | Create the new files url.h and url.c for parsing URL strings. The new structure struct pb_url holds the results of the parse operation. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Revert const device in discover_client_opsGeoff Levand2009-06-301-2/+2
| | | | | | | | | | | | | | 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>
* Fix memmove sizeGeoff Levand2009-06-301-1/+1
| | | | | | | Correct the byte count for several memmove calls. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* PS3 platform routinesGeoff Levand2009-03-302-0/+309
| | | | | | | | | | | Add new files ui/common/ps3.h and ui/common/ps3.c with platform specific routines to access the PS3 flash memory and to get and set the PS3 video mode. The flash routines use the ps3-utils library. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Rename client add remove opsGeoff Levand2009-03-302-11/+11
| | | | | | | | 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_initGeoff Levand2009-02-212-2/+3
| | | | | | | | 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>
* Fix log move commitGeoff Levand2009-02-021-1/+1
| | | | | | | | Fix missed log.h path change in log move commit (dae4540e417e2bf72dd83b2713a670bde0056ba9). Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* [discover client] Remove device from discover array before notifying UIJeremy Kerr2009-02-011-4/+4
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* [discover client] Add device accessorsJeremy Kerr2009-02-012-0/+32
| | | | | | Allow the UIs to query the current device set. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* [discover client] Make devices persistentJeremy Kerr2009-02-012-4/+49
| | | | | | | 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 constantGeoff Levand2009-02-012-6/+8
| | | | | | | 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>
OpenPOWER on IntegriCloud