diff options
author | Yaniv Levinsky <yaniv.levinsky@compulab.co.il> | 2018-06-24 19:16:56 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-07-19 16:17:58 -0400 |
commit | 5a04264ecf5f0f853f2d562b4c5efb139d3d4a9d (patch) | |
tree | 8274c01751e26af15b2c410c135760f2c78757a8 /cmd/nvedit.c | |
parent | 477f8116d517798d4d6456d920d57ff2f46d4271 (diff) |
cmd: nvedit: set H_INTERACTIVE in do_env_default
The function set_default_vars() in common.c adds H_INTERACTIVE to the
h_import() flag, but the function has no way of telling if the command
actually was user directed like this flag suggest. The flag should be
set by the calling function do_env_default() in nvedit.c instead, where
the command is certainty user directed.
Move the H_INTERACTIVE flag from set_default_vars() to do_env_default().
Signed-off-by: Yaniv Levinsky <yaniv.levinsky@compulab.co.il>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Diffstat (limited to 'cmd/nvedit.c')
-rw-r--r-- | cmd/nvedit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 1955dee0d0..8b73c606ca 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -780,7 +780,7 @@ int envmatch(uchar *s1, int i2) static int do_env_default(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - int all = 0, env_flag = 0; + int all = 0, env_flag = H_INTERACTIVE; debug("Initial value for argc=%d\n", argc); while (--argc > 0 && **++argv == '-') { |