diff options
| author | Casey Connolly <[email protected]> | 2025-10-23 16:26:46 +0200 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2025-10-26 10:15:21 +0000 |
| commit | 419cc25aa15784510a276f78441efbaf470b8577 (patch) | |
| tree | d95c26d66f2ca91701346f2f58be0a2512cee241 /cmd | |
| parent | 3cb97f929338f9373de6b41c4f2010357dd20778 (diff) | |
efi_loader: efi_console: support editable input fields
When editing eficonfig "optional data" (typically cmdline arguments)
it's useful to be able to edit the string rather than having to re-type
the entire thing. Implement support for editing buffers to make this a
whole lot nicer. Specifically, add support for moving the cursor with
the arrow keys and End key as well as deleting backwards with the delete
key.
Signed-off-by: Casey Connolly <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
Tested-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/eficonfig.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index 8ac0fb98e02..d8d946c87ac 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c @@ -974,6 +974,8 @@ static efi_status_t handle_user_input(u16 *buf, int buf_size, if (!tmp) return EFI_OUT_OF_RESOURCES; + /* Populate tmp so user can edit existing string */ + u16_strcpy(tmp, buf); ret = efi_console_get_u16_string(cin, tmp, buf_size, NULL, 4, cursor_col); if (ret == EFI_SUCCESS) u16_strcpy(buf, tmp); |
