summaryrefslogtreecommitdiffstats
path: root/init/initramfs.c
diff options
context:
space:
mode:
authorDavid Engraf <david.engraf@sysgo.com>2019-03-08 01:30:19 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-08 03:32:02 +0100
commite5eed351fd5eb73eecc1407cf00309e868379253 (patch)
tree7fedfd73a1ad832fe8f9fd777a02f5e752fa7484 /init/initramfs.c
parentlib/ubsan: default UBSAN_ALIGNMENT to not set (diff)
downloadlinux-e5eed351fd5eb73eecc1407cf00309e868379253.tar.xz
linux-e5eed351fd5eb73eecc1407cf00309e868379253.zip
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>
Diffstat (limited to 'init/initramfs.c')
-rw-r--r--init/initramfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/init/initramfs.c b/init/initramfs.c
index fca899622937..4749e1115eef 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -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;
}
@@ -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;