]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Add legacy flag (-l) to lz4 and update magic number
authorAlexander Tsoy <alexander@tsoy.me>
Wed, 26 Feb 2014 11:50:17 +0000 (15:50 +0400)
committerHarald Hoyer <harald@redhat.com>
Tue, 29 Jul 2014 09:52:07 +0000 (11:52 +0200)
Linux kernel does not support the new default lz4 format.

https://bugs.gentoo.org/show_bug.cgi?id=502102

dracut.sh
lsinitrd.sh

index 95f18dbf33f3dff72036b4d460c60be22d838c02..a5fcf389aff35c0414e6a7ce048c2f250da31a1a 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -720,7 +720,7 @@ case $compress in
     xz)    compress="xz --check=crc32 --lzma2=dict=1MiB -T0";;
     gzip)  compress="gzip -9"; command -v pigz > /dev/null 2>&1 && compress="pigz -9";;
     lzo)   compress="lzop -9";;
-    lz4)   compress="lz4 -9";;
+    lz4)   compress="lz4 -l -9";;
 esac
 if [[ $_no_compress_l = "cat" ]]; then
     compress="cat"
index 2fbebd8e3173ee8a63989edb4a2bf5c1eca1956c..7b12ab9694833268c5b0c743bfd911bfd1ca4687 100755 (executable)
@@ -178,7 +178,7 @@ CAT=$({
             $'\x71\xc7'*|070701)
                 echo "cat --"
                 ;;
-            $'\x04\x22'*)
+            $'\x02\x21'*)
                 echo "lz4 -d -c"
                 ;;
             *)