Dear Luka Perkov, In message <[email protected]> you wrote: > Patch from openwrt commit r20062 regarding erase_len. > > Correct types inside two fprintf functions. > > Signed-off-by: Luka Perkov < lists ->-to->- lukaperkov.net > > --- > > diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c > index ed6b53f..4e4f6aa 100644 > --- a/tools/env/fw_env.c > +++ b/tools/env/fw_env.c > @@ -488,7 +488,7 @@ int fw_setenv(int argc, char *argv[]) > value = (char *)malloc(len - strlen(name)); > if (!value) { > fprintf(stderr, > - "Cannot malloc %u bytes: %s\n", > + "Cannot malloc %zu bytes: %s\n", > len - strlen(name), strerror(errno)); > return -1; > } > @@ -779,7 +779,10 @@ static int flash_write_buf (int dev, int fd, void *buf, > size_t count, > erase_offset = (offset / blocklen) * blocklen; > > /* Maximum area we may use */ > - erase_len = top_of_range - erase_offset; > + if (mtd_type == MTD_NANDFLASH) > + erase_len = top_of_range - erase_offset; > + else > + erase_len = blocklen;
This is obviously not a printf() type fix. Please submit as separate patch, with exact descrition what this is good for, i. e. which problem it fixes. Thanks. 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: [email protected] "In matrimony, to hesitate is sometimes to be saved." - Butler _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

