From: Wolfgang Denk Date: Thu, 30 Apr 2009 13:06:35 +0200 Subject: [U-Boot] [PATCH] make fw_setenv write multiple variables In-Reply-To: <49F9738D.9060703@gennetsa.com> References: <49F9738D.9060703@gennetsa.com> Message-ID: <20090430110635.BA4DE83420E8@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 Nikos Mavrogiannopoulos, In message <49F9738D.9060703@gennetsa.com> you wrote: > > This patch makes fw_setenv write multiple variables on a single command > line. That is "fw_setenv var1 value1 var2 value2" will write all > variables and values without the need to erase multiple times the > environment. I reject this as it would introduce serious incompatibilities with the existing interfaces, both in fw_setenv and in the U-Boot setenv command. Not to mention that it would be extremely error prone. But I understand that such a functionality may be useful - just your interface design is bogus. What about the following alternative: add an option to fw_setenv to read the commands (evventually even with an [optional?] leading "setenv") from a file (or from stdin, if no file name or '-' is given). Then you can have one set of parameters per line, and no argument counting or similar things are needed. 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 Another dream that failed. There's nothing sadder. -- Kirk, "This side of Paradise", stardate 3417.3