[PATCH] missing padding in cpio_mkfile in usr/gen_init_cpio.c
authorAndrew Morton <akpm@osdl.org>
Mon, 29 Dec 2003 13:46:56 +0000 (05:46 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 29 Dec 2003 13:46:56 +0000 (05:46 -0800)
From: Olaf Hering <olh@suse.de>

We need to update `offset' here so that the subsequent push_pad() (which
uses `offset') will do the right thing.

usr/gen_init_cpio.c

index 2db360d..e1ccfaa 100644 (file)
@@ -197,6 +197,7 @@ void cpio_mkfile(const char *filename, const char *location,
 
        for (i = 0; i < buf.st_size; ++i)
                fputc(filebuf[i], stdout);
+       offset += buf.st_size;
        close(file);
        free(filebuf);
        push_pad();