# HG changeset patch # User Pascal Bellard # Date 1452936482 -3600 # Node ID 6e468bea3c845afdf352281da7e2e6ce3467817e # Parent c7214cd99f9b1456c2193b2a2f33c36cf387b590 syslinux/iso2exe.sh: -f should keep flavor info diff -r c7214cd99f9b -r 6e468bea3c84 syslinux/stuff/iso2exe/iso2exe.sh --- a/syslinux/stuff/iso2exe/iso2exe.sh Sat Jan 16 09:17:41 2016 +0000 +++ b/syslinux/stuff/iso2exe/iso2exe.sh Sat Jan 16 10:28:02 2016 +0100 @@ -150,6 +150,9 @@ dosstub rootfs.gz tazboot.com md5 ; do fileofs $f [ $SIZE -eq 0 ] && continue + [ -n "${OFFSET:6}" ] && continue + [ $OFFSET -lt 0 ] && continue + [ $(get $OFFSET $ISO 2) -eq 0 ] && continue echo -n "$f at $(printf "%X\n" $OFFSET)" [ $SIZE -eq -1 ] || echo -n " ($SIZE bytes)" echo . @@ -360,7 +363,7 @@ or: $0 --extract-custom-config image.iso EOT case "${2/--/-}" in - -u*|-r*|-w*) + -u*|-r*|-w*|-f*) case "$(get 0 $1)" in 23117) b=$(get 417 $1 1) @@ -371,11 +374,13 @@ ddq if=/dev/zero bs=1 seek=$n count=$((0x8000 - $n)) of=$1 conv=notrunc ;; *) ddq if=/dev/zero bs=1k count=32 of=$1 conv=notrunc ;; esac - clear_custom_config $1 - exit 0 ;; - -f*) - ddq if=/dev/zero bs=1k count=32 of=$1 conv=notrunc - [ "$append$initrd" ] && clear_custom_config $1 + case "${2/--/-}" in + -f*) + [ "$append$initrd" ] && clear_custom_config $1 ;; + *) + clear_custom_config $1 + exit 0 ;; + esac esac case "$(get 0 $1)" in 23117) echo "The file $1 is already an EXE file." 1>&2 && exit 1;;