public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-boot env variables parsing
Date: Thu, 01 Apr 2010 14:47:45 +0200	[thread overview]
Message-ID: <20100401124745.44144C88C6@gemini.denx.de> (raw)
In-Reply-To: <OFEBF95CA1.44E68372-ONC12576F8.0043F4F7-C12576F8.0044D7F5@transmode.se>

Dear Joakim Tjernlund,

In message <OFEBF95CA1.44E68372-ONC12576F8.0043F4F7-C12576F8.0044D7F5@transmode.se> 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

  reply	other threads:[~2010-04-01 12:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01  5:27 [U-Boot] U-boot env variables parsing Nitin Mahajan
2010-04-01 12:15 ` Detlev Zundel
2010-04-01 12:31   ` Joakim Tjernlund
2010-04-01 12:47     ` Wolfgang Denk [this message]
2010-04-01 12:56       ` Joakim Tjernlund
2010-04-01 13:05         ` Wolfgang Denk
2010-04-01 13:11           ` Joakim Tjernlund
2010-04-01 14:56             ` Detlev Zundel
2010-04-01 17:13               ` Joakim Tjernlund
2010-04-01 18:27                 ` Wolfgang Denk
2010-04-01 20:08                   ` Joakim Tjernlund
2010-04-08 10:00                     ` Detlev Zundel
2010-04-08 15:41                       ` Joakim Tjernlund
2010-04-08 16:06                         ` Detlev Zundel
2010-04-08 17:49                           ` Joakim Tjernlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100401124745.44144C88C6@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox