[U-Boot] [PATCH 3/4 v2] UBIFS: Change ubifsload to not read beyond the requested size
Wolfgang Denk
wd at denx.de
Mon Nov 1 20:05:00 CET 2010
Dear Stefan Roese,
In message <1288628880-6910-1-git-send-email-sr at denx.de> you wrote:
>
> + /* Read block-size into temp buffer */
> + ret = read_block(inode, buff, block, dn);
> + if (ret) {
> + err = ret;
> + if (err != -ENOENT) {
> + free(buff);
> + break;
> + }
> + }
...
> + ret = read_block(inode, addr, block, dn);
> + if (ret) {
> + err = ret;
> + if (err != -ENOENT)
> + break;
> + }
I still wonder what's the logic behind this code. When will
read_block() return -ENOENT (aka "No such file or directory") ?
What are the other possible error conditions, and why would it make
sense to continue reading after these other errors?
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 don't have to worry about me. I might have been born yesterday...
but I stayed up all night.
More information about the U-Boot
mailing list