[PATCH] jffs2reader: convert to common.h helpers

Mike Frysinger vapier at gentoo.org
Fri Oct 1 14:57:07 EDT 2010


On Fri, Oct 1, 2010 at 13:14, Mike Frysinger wrote:
> --- a/jffs2reader.c
> +++ b/jffs2reader.c
> @@ -136,10 +136,8 @@ void putblock(char *b, size_t bsize, size_t * rsize,
>  {
>        uLongf dlen = n->dsize;
>
> -       if (n->isize > bsize || (n->offset + dlen) > bsize) {
> -               fprintf(stderr, "File does not fit into buffer!\n");
> -               exit(EXIT_FAILURE);
> -       }
> +       if (n->isize > bsize || (n->offset + dlen) > bsize)
> +               errmsg("File does not fit into buffer!");

ugh, dont merge this one.  on a second review, i see that i used
"errmsg" when i should have used "errmsg_die".
-mike



More information about the linux-mtd mailing list