summaryrefslogtreecommitdiffstats
path: root/lsinitcpio
diff options
context:
space:
mode:
Diffstat (limited to 'lsinitcpio')
-rwxr-xr-xlsinitcpio7
1 files changed, 6 insertions, 1 deletions
diff --git a/lsinitcpio b/lsinitcpio
index f594fdc..7bbcb52 100755
--- a/lsinitcpio
+++ b/lsinitcpio
@@ -241,11 +241,16 @@ esac
# read compression type
case $(file -Lb "$_image") in
- @(data|LZMA)*) _compress=lzma ;;
+ 'Linux kernel'*)
+ die '%s is a kernel image, not an initramfs image!' "$_image" ;;
+ data*|LZMA*) _compress=lzma ;;
gzip*) _compress=gzip ;;
bzip2*) _compress=bzip2 ;;
lzop*) _compress=lzop ;;
XZ*) _compress=xz ;;
+ 'ASCII cpio'*) : ;;
+ *)
+ die 'Unexpected file type. Are you sure this is an initramfs?' "$_image" ;;
esac
if (( _optanalyze )); then