# HG changeset patch # User Pascal Bellard # Date 1473092115 -7200 # Node ID fd3dadf90ba9f0bfd51c2c54379215570d89b21d # Parent 67179a0300fde236a3172603920a5438dedb6c1d isolinux/iso2exe: fix copycmdline() diff -r 67179a0300fd -r fd3dadf90ba9 memtest/stuff/pack --- a/memtest/stuff/pack Sat Sep 03 19:40:30 2016 +0200 +++ b/memtest/stuff/pack Mon Sep 05 18:15:15 2016 +0200 @@ -7,6 +7,7 @@ [ -n "$x" ] && sed -i "s/XXXO/$((513+0x$x))/" $0 || sed -i "/XXXO$/d" $0 x=$(grep -s original_setupsize$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/') [ -n "$x" ] && sed -i "s/XXXS/$((516+0x$x))/" $0 || sed -i "/XXXS$/d" $0 + grep -q 83C60D ${3/.bin/.lst} && sed -i 's/ | dd bs=1 skip=13//' $0 helpmsg=$(sed '/helpmsg:/!d{n;s/ [0-9]* \([^ ]*\).*/\1/}' ${1/.bin/.lst} | sed '$!d') helpend=$(sed '/helpend:/!d{n;s/ [0-9]* \([^ ]*\).*/\1/}' ${1/.bin/.lst} | sed '$!d') sed -i "s/YYY/$((0x$helpmsg))/" $0 @@ -30,7 +31,7 @@ compress() { - xz -z -e --format=lzma --lzma1=mf=bt2 --stdout + xz -z -e --format=lzma --lzma1=mf=bt2 --stdout | dd bs=1 skip=13 } main() diff -r 67179a0300fd -r fd3dadf90ba9 memtest/stuff/unpack.S --- a/memtest/stuff/unpack.S Sat Sep 03 19:40:30 2016 +0200 +++ b/memtest/stuff/unpack.S Mon Sep 05 18:15:15 2016 +0200 @@ -204,6 +204,7 @@ iret unpack: +#define NO_LZMA_HEADER #include "unlzma.S" end: diff -r 67179a0300fd -r fd3dadf90ba9 syslinux/stuff/iso2exe/boot.c --- a/syslinux/stuff/iso2exe/boot.c Sat Sep 03 19:40:30 2016 +0200 +++ b/syslinux/stuff/iso2exe/boot.c Mon Sep 05 18:15:15 2016 +0200 @@ -190,7 +190,7 @@ } if (cmdline) { char *last; - for (s = cmdline; *s && *s != '\r' && *s != '\n'; s++) + for (s = last = cmdline; *s && *s != '\r' && *s != '\n'; s++) if (*s != ' ') last = s; *++last = 0; } diff -r 67179a0300fd -r fd3dadf90ba9 syslinux/stuff/iso2exe/libdos.c --- a/syslinux/stuff/iso2exe/libdos.c Sat Sep 03 19:40:30 2016 +0200 +++ b/syslinux/stuff/iso2exe/libdos.c Mon Sep 05 18:15:15 2016 +0200 @@ -193,18 +193,22 @@ void copycmdline(char store[]) { #asm + pop cx + pop ax + push ax + push cx push si push di push ds pop es mov si, #0x81 + xchg ax, di space: seg cs lodsb cmp al, #0x20 je space dec si - mov di, [bp+4] mov cx, #0x80/2 rep seg cs