| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
| |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
| |
We have a couple of strings that are missing the gettext call.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we have a bug where we can't clear a boot device UUID, as we
only update config->boot_device if we're in AUTOBOOT_ONE state. This
means that the config UI can't be used to change out of "autoboot from a
single device" mode.
This sets the autoboot device unconditionally, allowing it to be
cleared.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add the initial translation set for de, en, es, fr, it, ja, ko, pt_BR,
ru, zh_CN and zh_TW languages.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
| |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
The Configuration screen help doesn't reflect the option name, so
update that to match. Also, fix the wording of the "Rescan devices"
help.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Selecting 'OK' in the configuration or language select screen will send
a configuration change to the server and exit safe mode.
Exit safe mode explicity and warn the user that they are about to exit
it.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We should make it clear that we're looking for a PXE-style config file.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
The language, rescan and retrieve options are new, so add them to the
help text.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
We're not using gettext for the device label strings; this change adds
the necessary macros to do so.
Also, we change "Interface" to "Network", to make the label a little
more obvious.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the current testing infrastructure, we don't have a strictly
hierarchical set of dependencies. This causes problems with a recursive
make, and means we have to hack around some of the dependencies.
This change generates a single, top-level makefile from all of the
Makefile.am fragments. We still need the po/ directory as a separate
SUBDIR, but all others can be converted to non-recursive.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This change adds a language selector UI, and allows language changes
from incoming configuration messages.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
No translation necessary.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Boot options are now listed under their matching boot device in the
ncurses UI to help differentitate similar boot option names
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Since we may have a long list of devices on the configuration screen,
we'd like a way to jump between widgets. This change repeats the
PREV_FIELD/NEXT_FIELD driver request on these events.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
The 'Network' label was originally intended as a header, but we should
keep it consistent with other field labels.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a configuration setting for the default boot device.
We change the autoboot option to a select, as we have three possible
behaviours for autoboot:
( ) Don't autoboot
( ) Autoboot from any disk/network device
( ) Only autoboot from a specific disk/network device
The latter option will show a list of possible devices to seelct for
autoboot behaviour.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We always pass screen->net_conf_type as this parameter, so we may as
weel grab it from screen directly.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Incoming status messages can be an arbitrary length; if so, the status
line may be corrupt.
This change uses the 'n' variant of mvwaddnstr(), so we only write one
line of characters.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
We need to check for equality with opt_yes, not just check for non-zero.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
We're seeing occasionaly failures to autoboot due to supirious key
events (getch() returing -1) on an IPMI console.
This change modifies the process_key logic to only abort the default if
we see a valid key event.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Petitboot environments will probably want a basic terminfo defintion
(eg, vt220) rather than a full linux or xterm, but vt220 and friends
don't define a backtab key. Backtab can be useful for proper form
navigation, and without a key definition, we just get an escape, which
exits the current screen.
This change provides a static definition for KEY_BTAB, so we should
always have one available.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fields without O_STATIC can "scroll" horizontally, and we may miss a
left-hand section of text from the current display. This can mean that
the user can't leave a validated field with no indication why, if the
off-to-the-left data is not a valid entry.
This change adds a widgetset function to mark a field as fixed-size, so
we don't have this scrolling behaviour. This means that the entire field
contents will always be visible, and any validation errors can be seen.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ncurses' new_item() expects the name parameter to be a "printable
string", by converting it to a wchar *, and checking that each character
is printable with iswprint(). If it fails, we won't see a boot option at
all.
This change introduces a function to convert the label into something we
know is printable, and valid UTF-8. If mbstowcs fails, we replace it
with a generic 'Invalid option' label. If we encounter a valid multibyte
string with unprintable characters, we replace those with U+fffd
REPLACEMENT CHARACTER.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We're not freeing the discover_client on exit, as it's not attached to
any existing talloc context.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
We need to unpost the menu so that free_item can actually free the item.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Currently, pemnu_destroy is used to free items. This means that the menu
code needs to iterate over items, and we have no way to free the ITEM *
of items that aren't in a menu.
Instead, free the ITEM in the pmenu_item destructor.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the menu item creation is has two main functions:
pmenu_item_alloc and pmenu_item_setup. The latter does initialisation
(it sets item->name), and inserts the item into the menu. We have
pmenu_item_init to combine this into one, but that means we need to do
further initialisation (eg, to set on_execute) after the item has been
added to the menu.
Instead, this change use a more direct _create and _insert interface.
Create does the allocation and initialisation, while _insert does the
actual insertion.
This means new_item failures will be detected at creation time, rather
than during pmenu_insert. Also, we're now insert a completely-populated
item into the menu, rather than populating on_edit, on_execute and data
after insertion.
Because we can detect errors from creation (ie, from new_item failing),
we add handling code to cui_boot_option_add and cui_boot_editor_on_exit.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
The menu offsets are arbitrary, use a separate numbering scheme for user
items.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
... as nothing uses it.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently pmenu_item_setup may free its item parameter on error.
This makes it non-obvious whether the item is still allocated on exit to
the caller.
Instead, this change removes the talloc_free, and requires that the
caller do this on error. This makes the potential use-after-free in
cui_boot_editor_on_exit obvious, so we fix that too.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Currently, we have a bug where newly-configured DNS servers are appended
to the existing set of servers, rather than replacing them.
This change clears the existing servers out before adding the
newly-configured ones.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we need to compile with -DDEBUG to implement debug-level
logging in the UIs and discover server.
Since we may not be able to easily replace a system's petitboot
binaries, this change introduces a -v|--verbose option to the discver
server and ncurses UI, which enables debug at runtime. We also move some
of the udev debug code out of an #ifdef DEBUG block.
Since petitboot is generally started on boot, we also add a little
infrastructure to pass -v to petitboot on certain system contitions:
either petitboot.debug on the kernel command line, or a petitboot,debug?
NVRAM property containing the value 'true'.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
When we have multiple ncurses UIs running, we'd like to log to separate
files. Currenly, all UIs log to the same file, which makes it diffifult
to determine which UI is logging each message.
This change uses the output of ttyname() (sanitised appropriately) as a
component of the default log filename.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
The discover client isn't currently associating boot options with their
devices. This change adds appropriate device list management.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Now that we can re-initialise the device handler, allow this to be
triggered from UIs over the petitboot protocol.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
When adding new items to the petitboot menu, we need to ensure that the
scroll position of the menu includes the currently-selected item.
This change adds a call to set_top_row, calculated from the selected
item index, and the number of rows in the menu.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
This change is a small cleanup of the key bindings; we ensure that the
general key bindings are available (and documented) on all screens.
In order to keep things consistent, this change adds an initial UI
guidelines text file, which documents the general key bindings.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|