diff options
author | Michael Brown | 2006-12-20 12:42:48 +0100 |
---|---|---|
committer | Michael Brown | 2006-12-20 12:42:48 +0100 |
commit | cbeec25662029a4362ca484805d60264f9dca8d6 (patch) | |
tree | 289b37727ad4136931ea67e1befffc557fbe26cf /src/hci/tui/settings_ui.c | |
parent | Add EIO. (diff) | |
download | ipxe-cbeec25662029a4362ca484805d60264f9dca8d6.tar.gz ipxe-cbeec25662029a4362ca484805d60264f9dca8d6.tar.xz ipxe-cbeec25662029a4362ca484805d60264f9dca8d6.zip |
settings_ui() now returns a status code.
Diffstat (limited to 'src/hci/tui/settings_ui.c')
-rw-r--r-- | src/hci/tui/settings_ui.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/hci/tui/settings_ui.c b/src/hci/tui/settings_ui.c index 7112c0b8..706fc021 100644 --- a/src/hci/tui/settings_ui.c +++ b/src/hci/tui/settings_ui.c @@ -318,7 +318,7 @@ static void draw_instruction_row ( int editing ) { } } -static void main_loop ( struct config_context *context ) { +static int main_loop ( struct config_context *context ) { struct setting_widget widget; unsigned int current = 0; unsigned int next; @@ -379,7 +379,7 @@ static void main_loop ( struct config_context *context ) { alert ( " Could not save options: %s ", strerror ( rc ) ); } - return; + return rc; default: edit_setting ( &widget, key ); break; @@ -394,7 +394,9 @@ static void main_loop ( struct config_context *context ) { } -void settings_ui ( struct config_context *context ) { +int settings_ui ( struct config_context *context ) { + int rc; + initscr(); start_color(); init_pair ( CPAIR_NORMAL, COLOR_WHITE, COLOR_BLUE ); @@ -404,7 +406,9 @@ void settings_ui ( struct config_context *context ) { color_set ( CPAIR_NORMAL, NULL ); erase(); - main_loop ( context ); + rc = main_loop ( context ); endwin(); + + return rc; } |