summaryrefslogtreecommitdiffstats
path: root/ui/ncurses
Commit message (Collapse)AuthorAgeFilesLines
* lib/waiter: handle -EINTRJeremy Kerr2013-08-191-1/+1
| | | | | | | Now that we're handing non-fatal signals (i.e., SIGCHLD in the process lib), we need to gracefully handle -EINTR from poll(). Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* configure: Update to use AX_WITH_CURSESGeoff Levand2013-07-2310-12/+47
| | | | | | | | | | | For a more portable build system convert to using the autoconf-archive AX_WITH_CURSES macros. Allows building on openSUSE, which has a different header file layout than other distros, and fixes menu entries with UTF-8 characters; this causes fedora installs (codename "Schrödinger´s cat") to break the UI. Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/ncurses: Add setlocale callJeremy Kerr2013-07-231-0/+3
| | | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* ui/ncurses: Remove unused 'cod' variableJeremy Kerr2013-06-241-2/+1
| | | | | | | | | | | | When configured with --disable-debug, we get an unused variable warning: ui/ncurses/nc-cui.c: In function 'cui_device_remove': ui/ncurses/nc-cui.c:439:24: error: unused variable 'cod' cc1: all warnings being treated as errors This change just removes the temporary variable. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add initial dtb supportGeoff Levand2013-06-242-6/+14
| | | | | | | Updates & fixes by Jeremy Kerr <jk@ozlabs.org>. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add cancel-default reportingJeremy Kerr2013-06-244-78/+6
| | | | | | | | | When we first see key input, we can tell the discover server to cancel the default boot. Untested on ps3. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui: implement timers with waitsetsJeremy Kerr2013-06-242-6/+0
| | | | | | | A temporary change to the timers; we'll eventually remove these from the ui code. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/waiter: Add timeout waitersJeremy Kerr2013-06-241-2/+2
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: implement global keysJeremy Kerr2013-05-211-0/+16
| | | | | | | Add process_global_keys to handle global key events. Using this, implement ctrl+l to refresh. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: move getch() out of process_key callbacksJeremy Kerr2013-05-215-127/+116
| | | | | | | | All process_key callbacks will want to query the key that was pressed, so do the getch() once in cui_process_key, and pass the result to the callback. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/nc: Don't segfault if we can't open log_fileJeremy Kerr2013-05-091-0/+3
| | | | | | Fallback to logging to /dev/null. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/nc: Handle cui_opt_data with no boot option more gracefullyJeremy Kerr2013-05-091-0/+5
| | | | | | | | | | We can currently segfault petitboot by escaping from the option editor (before entering any details), then trying to boot the new, empty option. This change adds some sanity checks to prevent a segfault. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Simplify menu item namesJeremy Kerr2013-05-091-35/+2
| | | | | | Just use the item name, rather than including boot option details. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* 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>
* cui: Show incoming status messagesJeremy Kerr2013-05-061-5/+13
| | | | | | | Add a callback to handle and display boot status messages from the discover server. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* protocol: Separate device add from boot-option add messagesJeremy Kerr2013-04-161-51/+39
| | | | | | | | | | | | | | | | | | | | 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>
* 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-153-13/+5
| | | | | | | 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-153-36/+5
| | | | | | | | | | | | | | | | | | | | | 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>
* 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-151-15/+2
| | | | | | | | | | | | | | 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>
* ui: callback & boot actions: kexec -> bootJeremy Kerr2013-04-154-19/+19
| | | | | | | | | 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-156-58/+58
| | | | | | | | 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>
* waiter: Don't rely on global variables to keep waiter stateJeremy Kerr2013-04-102-6/+9
| | | | | | | | | 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-102-2/+2
| | | | | | | | | | | | 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/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>
* Speed up --start-daemon optionGeoff Levand2012-03-301-4/+4
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Cleanup --dry-run option codeGeoff Levand2012-03-304-14/+19
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add UI option --dry-runGeoff Levand2012-03-271-14/+19
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Log to stderr, allow --log=-Geoff Levand2012-03-262-8/+14
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add --start-daemon option to ui programsGeoff Levand2012-03-083-10/+35
| | | | | | | | 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-082-5/+5
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Rename pb-nc, pb-twin to petitboot-nc, petitboot-twinGeoff Levand2012-03-081-7/+7
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Move installed programs from bin to sbinGeoff Levand2012-02-241-2/+2
| | | | 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>
* 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-121-0/+58
| | | | 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>
* Remove KEY_LEFT in nc-menuGeoff Levand2011-11-121-1/+0
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* 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>
* Add default video arg to kernel command lineGeoff Levand2009-07-091-2/+30
| | | | | | | Add the current bootloader video mode to the kernel command line when the command line does not have a video mode specified. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add ncurses joystick supportGeoff Levand2009-07-098-5/+120
| | | | Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Update item text on editGeoff Levand2009-07-093-28/+112
| | | | | | Update the boot option menu item text on edit. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Remove unused ked status ked_boot.Geoff Levand2009-07-092-8/+1
| | | | | | Remove unused code for the ked return status ked_boot. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Remove nc menu descriptionGeoff Levand2009-07-095-38/+23
| | | | | | Remove some unused nc menu description code. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* CUI add empty itemGeoff Levand2009-07-097-14/+72
| | | | | | Add a CUI hot-key 'o' that opens a new empty menu item. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add generic CUI programGeoff Levand2009-07-091-0/+288
| | | | | | Add a non-PS3 CUI program. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
OpenPOWER on IntegriCloud