summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-cui.h
Commit message (Collapse)AuthorAgeFilesLines
* ui/ncurses: Add plugin menu and nc-plugin screenSamuel Mendoza-Jonas2017-08-151-2/+11
| | | | | | | | | | | | Add a second pmenu accessible via the main menu which displays uninstalled and installed pb-plugins. Uninstalled options can be selected to trigger pb-plugin to install them, after which they are updated and marked as installed in the menu. Installed plugins can be investigated by entering the new plugin screen, where plugin metadata and executables are displayed. Executables can be run from this screen via cui_run_cmd(). Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* ui/ncurses: Update cui_run_cmd() to pass display to commandSamuel Mendoza-Jonas2017-08-151-1/+2
| | | | | | | | | Update cui_run_cmd() to setup a process that uses 'raw_stdout' so that output is displayed on the screen instead of being caught in the log. Also update cui_run_cmd() to take a more generic list of arguments, and add a cui_run_cmd_from_item() wrapper for the existing user. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* ui/ncurses: Add status log UIJeremy Kerr2016-12-201-0/+3
| | | | | | | | | | | | | Currently, status messages from the server are displayed in a single line at the bottom of the main menu UI, and are lost once a new status is reported. This change adds a facility for the UI to collect and display the status messages from the server, in a dedicated UI screen. This allows a user to look back through the discovery & boot process. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* ui/ncurses: Start UI before connected to serverSamuel Mendoza-Jonas2016-05-061-1/+1
| | | | | | | | | | | | | | | | If petitboot-nc starts before the discover server it will try to connect for a short while waiting for the server to appear. However in some scenarios the server can take longer than expected to come up, for example if the kernel is compiled with modules and the system has many disks, and the process will timeout and exit before the server is ready. The UI does not appear during this time so it can appear as if Petitboot failed to start at all. Change the default behaviour to start the UI first, and then wait for the server to appear. The UI will not timeout in this mode. The "--timeout" option is added to start with the old behaviour. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* ui: Fix typo: 'deamon' -> 'daemon'Samuel Mendoza-Jonas2016-05-061-1/+1
| | | | Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* ui/ncurses: Add nc-subset selection screenSamuel Mendoza-Jonas2015-05-051-0/+3
| | | | | | | | | | The nc-subset screen is intended to be used as a sub-screen from the current screen (eg. nc-config) which passes a pointer to a nc_widget_subset struct. The nc-subset screen allows the user to select an option from a list of 'inactive' options, before returning control back to the current screen. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
* ui/ncurses: Add support for 'add-url' actionSamuel Mendoza-Jonas2014-07-281-0/+3
| | | | | | | | Creates a menu option to specify a remote conf file url to send to the server for parsing. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add language selector & support for language changesJeremy Kerr2014-07-281-0/+2
| | | | | | | This change adds a language selector UI, and allows language changes from incoming configuration messages. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Move menu initialisation to cui codeJeremy Kerr2014-07-281-1/+1
| | | | | | | | | | | We'll want to re-initialise the petitboot main menu (when the language is changed), which we can't do if the items are populated entirely from the main() function. This change moves the menu initilisation to the cui code, we we can re-init when necessary. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Use a separate type for help textJeremy Kerr2014-07-281-1/+3
| | | | | | | | | | | | Because it's initialised statically, help text won't be directly gettext()-ed. Instead, we need to perform the gettext translation at runtime, and pass untranslated strings into the help_screen code. Instead of trusting callers to pass the untranslated strings though, we encapsulate the help text data into struct help_text, so we know we have an unstranslated string. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add menu option to restart discoveryJeremy Kerr2014-04-021-0/+1
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add support for help screensJeremy Kerr2014-01-311-0/+2
| | | | | | | Add a textscreen-based help screen system, triggered from the cui module's cui_show_help() Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Make boot editor API consistent with config & sysinfo screensJeremy Kerr2013-11-221-1/+1
| | | | | | | | | | | | The boot-editor API is a little more exposed than it needs to be: the boot_editor struct does not need to be available to other files, and the init function and on_exit functions differ from those provided for the config and sysinfo screens. This change unifies the boot_editor API with those for the other screens. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Parse configuration form & send to serverJeremy Kerr2013-11-141-0/+1
| | | | | | | This change implements the configuration save action, when the user submits the nc-config form. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add basic config editorJeremy Kerr2013-11-141-0/+2
| | | | | | This change adds a simple configuration editor to the ncurses UI. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Receive config messagesJeremy Kerr2013-11-131-0/+1
| | | | | | We just store the config in the cui for now. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add sysinfo screenJeremy Kerr2013-11-131-0/+2
| | | | | | | | Add a simple screen for displaying the struct system_info. We add this to the main menu as a selectable option, and separate it from the boot option list with an unselectable blank entry. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Defer item creation until boot editor is doneJeremy Kerr2013-10-101-1/+2
| | | | | | | | | | | | Currently, when creating new menu entries, we create an empty item, add it to the menu, then run the boot editor. This means that cancelling the edit will leave an empty item in the menu. This change defers the creation until the boot editor is done. To do this, we modify the on_open callback to take a menu rather than an item, and pass NULL boot data to the editor. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Display sysinfo type & identifierJeremy Kerr2013-10-091-0/+1
| | | | | | | Hook into the sysinfo updates to display the type & id at the top of the petitboot main menu. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/process: Add dry_run argument to process_initJeremy Kerr2013-08-201-1/+2
| | | | | | | Implement dry-run behaviour on the discover server by passing a bool to process_init. UIs don't need to support dry runs. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui/ncurses: Add cancel-default reportingJeremy Kerr2013-06-241-13/+1
| | | | | | | | | 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>
* Move --dry-run option to discover serverJeremy Kerr2013-04-151-2/+1
| | | | | | | 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-151-1/+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>
* ui/ncurses: Add discover client to struct cuiJeremy Kerr2013-04-151-0/+1
| | | | | | .. we'll need it later. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* ui: callback & boot actions: kexec -> bootJeremy Kerr2013-04-151-2/+2
| | | | | | | | | 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-151-1/+1
| | | | | | | | 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-151-2/+2
| | | | | | | | | | 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-101-0/+1
| | | | | | | | | 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>
* Cleanup --dry-run option codeGeoff Levand2012-03-301-1/+2
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add --start-daemon option to ui programsGeoff Levand2012-03-081-1/+1
| | | | | | | | 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>
* Add ncurses joystick supportGeoff Levand2009-07-091-1/+4
| | | | Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* CUI add empty itemGeoff Levand2009-07-091-1/+5
| | | | | | Add a CUI hot-key 'o' that opens a new empty menu item. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add CUI countdown timerGeoff Levand2009-07-091-1/+13
| | | | | | Add support for a petitboot CUI countdown timer. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add ncurses UI supportGeoff Levand2009-06-301-0/+88
Add helper routines to support ncurses UI programs. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
OpenPOWER on IntegriCloud