Skip to content

Commit e5eed35

Browse files
dengraftorvalds
authored andcommitted
init/initramfs.c: provide more details in error messages
Use distinct error messages when archive decompression failed. Link: http://lkml.kernel.org/r/20190212075635.7373-1-david.engraf@sysgo.com Signed-off-by: David Engraf <david.engraf@sysgo.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1a6a1db commit e5eed35

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎init/initramfs.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ static long __init flush_buffer(void *bufv, unsigned long len)
431431
len -= written;
432432
state = Reset;
433433
} else
434-
error("junk in compressed archive");
434+
error("junk within compressed archive");
435435
}
436436
return origLen;
437437
}
@@ -488,9 +488,9 @@ static char * __init unpack_to_rootfs(char *buf, unsigned long len)
488488
message = msg_buf;
489489
}
490490
} else
491-
error("junk in compressed archive");
491+
error("invalid magic at start of compressed archive");
492492
if (state != Reset)
493-
error("junk in compressed archive");
493+
error("junk at the end of compressed archive");
494494
this_header = saved_offset + my_inptr;
495495
buf += my_inptr;
496496
len -= my_inptr;

0 commit comments

Comments
 (0)