Skip to content

Commit

Permalink
init/initramfs.c: provide more details in error messages
Browse files Browse the repository at this point in the history
Use distinct error messages when archive decompression failed.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: David Engraf <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Tested-by: Andy Shevchenko <[email protected]>
Cc: Dominik Brodowski <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Philippe Ombredanne <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Luc Van Oostenryck <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dengraf authored and torvalds committed Mar 8, 2019
1 parent 1a6a1db commit e5eed35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions init/initramfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ static long __init flush_buffer(void *bufv, unsigned long len)
len -= written;
state = Reset;
} else
error("junk in compressed archive");
error("junk within compressed archive");
}
return origLen;
}
Expand Down Expand Up @@ -488,9 +488,9 @@ static char * __init unpack_to_rootfs(char *buf, unsigned long len)
message = msg_buf;
}
} else
error("junk in compressed archive");
error("invalid magic at start of compressed archive");
if (state != Reset)
error("junk in compressed archive");
error("junk at the end of compressed archive");
this_header = saved_offset + my_inptr;
buf += my_inptr;
len -= my_inptr;
Expand Down

0 comments on commit e5eed35

Please sign in to comment.