Commit [7d8559] Maximize Restore History

env: fix "env ask" command

The "env ask" traditionally uses a somewhat awkward syntax:

env ask name [message ...] [size]

So far, when a mesage was given, you always also had to enter a size.
If you forgot to do that, the command would terminate without any
indication of the problem.

To avoid incompatible changes of the interface, we now check the last
argument if it can be converted into a decimal number. If this is the
case, we assume it is a size; otherwise we treat it as part of the

Also, add a space after the message fore easier reading,
and clean up help mesage.

Signed-off-by: Wolfgang Denk <>

Wolfgang Denk Wolfgang Denk 2013-02-20

Tom Rini Tom Rini 2013-03-12

changed common/cmd_nvedit.c
common/cmd_nvedit.c Diff Switch to side-by-side view