From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Ignore all Carriage Returns when importing an environment.
Date: Sat, 12 May 2012 23:18:11 +0200 [thread overview]
Message-ID: <20120512211811.9CAED200049@gemini.denx.de> (raw)
In-Reply-To: <4FAE7232.1050407@ahsoftware.de>
Dear Alexander Holler,
In message <4FAE7232.1050407@ahsoftware.de> you wrote:
>
> > I would like to put as little restrictions on the content of an
> > environment variable as possible. I can see valid use for strings
> > that contain a CR character.
>
> I don't see any reasonable usage for carriage returns in imported
> environment variables, but I've seen many people from the windows camp
A CR causes the output to re-start from start of line. I can
construct all kind of fancy disply by using "echo $var" - especially
so if "var" can contain control characters including CR. It makes no
sense striiping these out.
> struggling in writing small text files to set some environment variables
> (which mostly end up in the kernel cmdline). Especially because those
> CR's often will lead to obscure errors because almost nothing (in u-boot
> or linux) is able to handle them.
This is a problem that is as old as DOS, and solutions for this have
been known since. I already mentioned dos2unix.
> Anyway I don't really care, I just found it very user friendly to strip
> the carriage returns, especially for those embedded newbies which are in
> need to use some unnamed windows IDE.
>
> So I've decided (after having that patch lying around for about a year)
> to finally post it.
Thanks - but it adds restrictions to doing perfectly valid things. I
see the disadvantages significantly bigger than what we can win - keep
in mind, that dealing wqith DOS line endings is a topic that is
decades old.
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
You get a wonderful view from the point of no return.
- Terry Pratchett, _Making_Money_
next prev parent reply other threads:[~2012-05-12 21:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 7:14 [U-Boot] [PATCH] Ignore all Carriage Returns when importing an environment Alexander Holler
2012-05-11 19:09 ` Wolfgang Denk
2012-05-12 14:22 ` Alexander Holler
2012-05-12 21:18 ` Wolfgang Denk [this message]
2012-05-13 8:07 ` Alexander Holler
2012-05-13 9:27 ` Wolfgang Denk
2012-05-12 6:17 ` Marek Vasut
2012-05-12 14:25 ` Alexander Holler
2012-05-12 14:46 ` Marek Vasut
2012-05-12 14:50 ` Alexander Holler
2012-05-12 16:08 ` Marek Vasut
2012-05-12 18:33 ` Alexander Holler
2012-05-12 18:37 ` Marek Vasut
2012-05-12 19:10 ` Alexander Holler
2012-05-12 21:21 ` Wolfgang Denk
2012-05-13 7:43 ` Alexander Holler
2012-05-12 21:19 ` Wolfgang Denk
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=20120512211811.9CAED200049@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