Vladimir Serbinenko (phcoder@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4692
-gerrit
commit 15192cefd0b6250f4077a0868aeca4b1adf39081 Author: Vladimir Serbinenko phcoder@gmail.com Date: Wed Jan 15 22:07:52 2014 +0100
nvramcui: Trim values when setting.
Values get space-padded by curses and then enum search fails to match them. Rtrim to compensat for curses.
Change-Id: Iecf095f21cfade9425eaa039b67625615eb80481 Signed-off-by: Vladimir Serbinenko phcoder@gmail.com --- payloads/nvramcui/nvramcui.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/payloads/nvramcui/nvramcui.c b/payloads/nvramcui/nvramcui.c index 04367cd..daf153b 100644 --- a/payloads/nvramcui/nvramcui.c +++ b/payloads/nvramcui/nvramcui.c @@ -232,6 +232,10 @@ int main() for (i = 0; i < numopts; i++) { char *name = field_buffer(fields[2*i], 0); char *value = field_buffer(fields[2*i+1], 0); + char *ptr; + for (ptr = value + strlen (value) - 1; + ptr >= value && *ptr == ' '; ptr--); + ptr[1] = '\0'; set_option_from_string(use_nvram, opttbl, value, name); }