From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Thu, 01 Apr 2010 14:47:45 +0200 Subject: [U-Boot] U-boot env variables parsing In-Reply-To: References: <553166.33158.qm@web50107.mail.re2.yahoo.com> Message-ID: <20100401124745.44144C88C6@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 Joakim Tjernlund, In message you wrote: > > linuxip=ip=$(ipaddr)::$(gatewayip):$(netmask):$(hostname):$(linuxif):off > tboot=setenv bootargs $(linuxroot) $(linuxip) $(extra);tftp 100000; bootm 100000 > > it was fairly simple to do but I don't think WD applied it since the old shell was obsolete I don't think you ever posted this before. I cannot find any trace of such a patch - not in the public archives nor locally. > /* find macros in this token and replace them */ > - process_macros (token, finaltoken); > + if(process_macros (token, finaltoken)){ > + strcpy(tmptoken,finaltoken); > + while(process_macros (tmptoken, finaltoken)) > + strcpy(tmptoken,finaltoken); > + } Hm... will this not make escaping impossible? Assume you want to pass arg=${name} to Linux. How would you escape this so it does NOT get expanded if you run process_macros() arbitrarily often? 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 Brontosaurus Principle: Organizations can grow faster than their brains can manage them in relation to their environment and to their own physiology: when this occurs, they are an endangered species. - Thomas K. Connellan