[U-Boot] [PATCH] Add a memory get command

Wolfgang Denk wd at denx.de
Sun Sep 2 21:10:42 CEST 2012


Dear Joe Hershberger,

In message <1345237121-20594-1-git-send-email-joe.hershberger at ni.com> you wrote:
> This command allows you to read the value of a memory address and store
> it in an environment variable.
> 
> Signed-off-by: Joe Hershberger <joe.hershberger at ni.com>
> ---
>  common/cmd_mem.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 47 insertions(+)

This seems redundant to me.

We already have similar functionality in the "setexpr" command.

Instead of your "mg var $addr" you can do "setexpr var $addr \| 0"
today.  I do agree that this looks a bit circuitous and suggest to
change the "setexpr" such that in addition to the regular

	setexpr [.b, .w, .l] name value1 <op> value2

syntax it will also accept

	setexpr [.b, .w, .l] name value1

in which case it would set the variable "name" to the value of
"value1".

What do you think?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Felson's Law:
	To steal ideas from one person is plagiarism; to steal from
	many is research.


More information about the U-Boot mailing list