[U-Boot] [PATCH 1/4] Add option -r to env import to allow import of text files with CRLF as line endings
wd at denx.de
Sun Aug 3 19:47:22 CEST 2014
In message <53DD53A5.3010502 at ahsoftware.de> you wrote:
> > Should we not, for reasons of symmetry, then also extend "env export"
> > by such a "-r" option?
> Sorry, but I don't follow the new features of u-boot that closely.
This is not a new feature.
> Is it already possible to save an exported environment as (text-)file to
> some storage? Such wasn't possible when I've implemented that -r for
> "env import" and it doesn't make much sense if an exported environment
> never reaches users.
"env import" and "env export" have always been symmetric. In the same
way you can (and could) import the environment from a memory reagion
(not directoly form a file) you can export it to one. So all you need
is the capability to read a file into a memory reagion resp. to write
a file from one. Eventually file write support was not present yet
when you looked at this, but now at least (V)FAT and ext4 include
write support (fatwrite, ext4write).
> Another problem would be to decide in which format to save the
> environment. Same magic (e.g. an env var set by "env import") would be
> necessary to decided in which format to save the environment.
This is a decision made by the user, ha has to know what he wants to
do resp. which format the file he is reading has or the file he is
writing shall have.
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
Often it is fatal to live too long. - Racine
More information about the U-Boot