]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
env: fix "env ask" command
authorWolfgang Denk <wd@denx.de>
Wed, 20 Feb 2013 04:53:16 +0000 (04:53 +0000)
committerTom Rini <trini@ti.com>
Tue, 12 Mar 2013 16:43:31 +0000 (12:43 -0400)
commit7d85591dda47f62e73d878d2d0ea5bd0ff2528ad
treef001c7711f1a93669cdef38c3213669b70e1abba
parent01fac041cb32408a4fc5f4617381da6ec609a8dc
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
message.

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

Signed-off-by: Wolfgang Denk <wd@denx.de>
common/cmd_nvedit.c