summaryrefslogtreecommitdiffstats
path: root/src/hci/tui
diff options
context:
space:
mode:
authorMichael Brown2008-03-18 01:48:23 +0100
committerMichael Brown2008-03-18 01:48:23 +0100
commit5a08b434c7ddecb9cab0f8aedd9db679ca35395c (patch)
tree661b193f21aeaf89aafaf8d92d28ae39444f85aa /src/hci/tui
parentMerge branch 'pxerom-pmm' (diff)
downloadipxe-5a08b434c7ddecb9cab0f8aedd9db679ca35395c.tar.gz
ipxe-5a08b434c7ddecb9cab0f8aedd9db679ca35395c.tar.xz
ipxe-5a08b434c7ddecb9cab0f8aedd9db679ca35395c.zip
[Settings] show_setting() functions return snprintf()-style length.
show_setting() and related functions now return an "actual length" in the style of snprintf(). This is to allow consumers to allocate buffers large enough to hold the formatted setting.
Diffstat (limited to 'src/hci/tui')
-rw-r--r--src/hci/tui/settings_ui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hci/tui/settings_ui.c b/src/hci/tui/settings_ui.c
index 336af4e9..c6261c77 100644
--- a/src/hci/tui/settings_ui.c
+++ b/src/hci/tui/settings_ui.c
@@ -118,7 +118,7 @@ static void load_setting ( struct setting_widget *widget ) {
/* Read current setting value */
if ( show_setting ( widget->context, widget->setting,
- widget->value, sizeof ( widget->value ) ) != 0 ) {
+ widget->value, sizeof ( widget->value ) ) < 0 ) {
widget->value[0] = '\0';
}