[U-Boot] [PATCH 1/2] Add option -r to env import to allow import of text files with CRLF as line endings

Wolfgang Denk
2012-05-13T18:45:21Z

Dear Alexander Holler,

In message <1336913407-7383-1-git-send-email-holler@ahsoftware.de> you wrote:
> When this option is enabled, CRLF is treated like LF when importing environments
> from text files, which means CRs ('\r') in front of LFs ('\n') are just ignored.
>
> Drawback of enabling this option is that (maybe exported) variables which have
> a trailing CR in their content will get imported without that CR.
>
> Signed-off-by: Alexander Holler <holler@ahsoftware.de>
> ---
> common/cmd_nvedit.c | 17 ++++++++++++++---
> common/env_common.c | 4 ++--
> include/search.h | 2 +-
> lib/hashtable.c | 23 +++++++++++++++++++----
> 4 files changed, 36 insertions(+), 10 deletions(-)

Please make this optional. I don't want the increased code size for
all boards when probablyonly one or two will ever activate this. And
please add documentation, and include a note that the use of this
option is discouraged, as the problem should be addressed outside
U-Boot.

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
In the future, you're going to get computers as prizes in breakfast
cereals. You'll throw them out because your house will be littered
with them. - Robert Lucky