From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sun, 02 Sep 2012 21:10:42 +0200 Subject: [U-Boot] [PATCH] Add a memory get command In-Reply-To: <1345237121-20594-1-git-send-email-joe.hershberger@ni.com> References: <1345237121-20594-1-git-send-email-joe.hershberger@ni.com> Message-ID: <20120902191042.920F7203B2F@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Joe Hershberger, In message <1345237121-20594-1-git-send-email-joe.hershberger@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 > --- > 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 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.