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

Wolfgang Denk wd at denx.de
Sun May 13 20:45:21 CEST 2012


Dear Alexander Holler,

In message <1336913407-7383-1-git-send-email-holler at 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 at 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


More information about the U-Boot mailing list