commit 60086bea663782db0e65205f248683620f7ece5f
Author: Arkadiusz Miƛkiewicz <[email protected]>
Date:   Mon Nov 13 10:29:41 2017 +0100

    Add support for zstd(.spec) compression.

 geninitrd | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index 1649787..0a18298 100755
--- a/geninitrd
+++ b/geninitrd
@@ -46,7 +46,7 @@ proc_partitions=no
 usage() {
        echo "Usage: $PROGRAM [--version] [-v] [-f] [--ifneeded] [--preload 
<module>]"
        echo "       [--with=<module>] [--image-version] [--fstab=<fstab>] 
[--nocompress]"
-       echo "       [--compress=yes|xz|lzma|bzip2|gzip|lzo]"
+       echo "       [--compress=yes|zstd|xz|lzma|bzip2|gzip|lzo]"
        echo "       [--nostrip ] [--strip PATH/strip] [--strip=PATH/strip]"
        echo "       [--initrdfs=rom|initramfs|ext2|cram] 
[--modules-conf=<modules.conf>]"
        echo "       [--with-bootsplash] [--without-bootsplash]"
@@ -1089,7 +1089,7 @@ sym_exists() {
 # find best compressor (or forced one) for initrd
 find_compressor() {
        local mode="$1"
-       local compressors='xz lzma bzip2 gzip lzo'
+       local compressors='zstd xz lzma bzip2 gzip lzo'
 
        # a specified one, take it
        if ! is_yes "$mode"; then
@@ -1121,6 +1121,10 @@ find_compressor() {
                        sym=unlzo
                        prog=/usr/bin/lzop
                        ;;
+               zstd)
+                       sym=zstd
+                       prog=/usr/bin/zstd
+                       ;;
                none|no)
                        # any existing sym will work
                        sym=initrd_load
@@ -1163,6 +1167,9 @@ compress_image() {
        lzo)
                lzop -9 < "$IMAGE" > "$tmp" || return $?
                ;;
+       zstd)
+               zstd -9 < "$IMAGE" > "$tmp" || return $?
+               ;;
        none|no)
                cat < "$IMAGE" > "$tmp" || return $?
                ;;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/geninitrd.git/commitdiff/60086bea663782db0e65205f248683620f7ece5f

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to