]> git.ozlabs.org Git - petitboot/commit
ui/ncurses: Fix boot editor segfault on update
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Fri, 16 Feb 2018 02:55:26 +0000 (13:55 +1100)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 27 Feb 2018 00:43:36 +0000 (11:43 +1100)
commitd63bacef37d61b46e8db10914d4a7a677ba0775a
tree23b6c6c44b3cd6b99aec64dd5351fffad634be5f
parentdc85de97c79c2172a87fc95cca16e6c6055dc1f4
ui/ncurses: Fix boot editor segfault on update

The boot option editor screen segfaults on a system info update since it
loses track of which fields actually exist.

The boot editor screen's setup and drawing logic is a bit different from
other screens, so to fix this bug and preserve the maintainer's sanity,
bring the screen setup and redraw into line with other screens. This
includes a full teardown of the widgets on update, so save the content
of any textboxes on update so the user's changes are not lost.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
ui/ncurses/nc-boot-editor.c