[U-Boot] [PATCH] env: Allow accessing non-mtd devices
Wolfgang Denk
wd at denx.de
Thu Feb 7 00:27:43 CET 2013
Dear Lubomir Rintel,
In message <1360191923-4688-1-git-send-email-lkundrak at v3.sk> you wrote:
> In certain cases, memory device is present as flat file or block device (via
> mmc or mtdblock layer). Do not attempt MTD operations against it.
>
> Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
> ---
> tools/env/fw_env.c | 20 ++++++++++++++++----
> tools/env/fw_env.config | 3 +++
> 2 files changed, 19 insertions(+), 4 deletions(-)
Arghhh! NAK.
There is no patch version, no history of changes, nothing.
Please read
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions
and follow the rules.
Please also see my previous review comments.
Also:
> - rc = ioctl (fd, MEMGETINFO, &mtdinfo);
> + rc = fstat(fd, &st);
> if (rc < 0) {
> - perror ("Cannot get MTD information");
> + perror("Cannot access the device file");
> return -1;
> }
This error message is still misleading (as you did not use any
access(2) system call in your code); also, the use of perror() is
- let's say - a bit unusual (not your fault in the first place)
and should be fixed; it would be more helpful to print the actual
file name here.
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
A conservative is a man with two perfectly good legs who has never
learned to walk. - Franklin D. Roosevelt
More information about the U-Boot
mailing list