mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
env: Avoid clobbering an edited variable on ctrl-c
If readline says there was an error, don't write to the variable! Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
949a771097
commit
18a3cce9fa
1 changed files with 2 additions and 1 deletions
|
@ -552,7 +552,8 @@ static int do_env_edit(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||
else
|
||||
buffer[0] = '\0';
|
||||
|
||||
readline_into_buffer("edit: ", buffer, 0);
|
||||
if (readline_into_buffer("edit: ", buffer, 0) < 0)
|
||||
return 1;
|
||||
|
||||
return setenv(argv[1], buffer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue