wok-next rev 19403
isolinux/iso2exe: fix copycmdline()
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Sep 05 18:15:15 2016 +0200 (2016-09-05) |
parents | 67179a0300fd |
children | 4ebd023252ac |
files | memtest/stuff/pack memtest/stuff/unpack.S syslinux/stuff/iso2exe/boot.c syslinux/stuff/iso2exe/libdos.c |
line diff
1.1 --- a/memtest/stuff/pack Sat Sep 03 19:40:30 2016 +0200 1.2 +++ b/memtest/stuff/pack Mon Sep 05 18:15:15 2016 +0200 1.3 @@ -7,6 +7,7 @@ 1.4 [ -n "$x" ] && sed -i "s/XXXO/$((513+0x$x))/" $0 || sed -i "/XXXO$/d" $0 1.5 x=$(grep -s original_setupsize$ ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/') 1.6 [ -n "$x" ] && sed -i "s/XXXS/$((516+0x$x))/" $0 || sed -i "/XXXS$/d" $0 1.7 + grep -q 83C60D ${3/.bin/.lst} && sed -i 's/ | dd bs=1 skip=13//' $0 1.8 helpmsg=$(sed '/helpmsg:/!d{n;s/ [0-9]* \([^ ]*\).*/\1/}' ${1/.bin/.lst} | sed '$!d') 1.9 helpend=$(sed '/helpend:/!d{n;s/ [0-9]* \([^ ]*\).*/\1/}' ${1/.bin/.lst} | sed '$!d') 1.10 sed -i "s/YYY/$((0x$helpmsg))/" $0 1.11 @@ -30,7 +31,7 @@ 1.12 1.13 compress() 1.14 { 1.15 - xz -z -e --format=lzma --lzma1=mf=bt2 --stdout 1.16 + xz -z -e --format=lzma --lzma1=mf=bt2 --stdout | dd bs=1 skip=13 1.17 } 1.18 1.19 main()
2.1 --- a/memtest/stuff/unpack.S Sat Sep 03 19:40:30 2016 +0200 2.2 +++ b/memtest/stuff/unpack.S Mon Sep 05 18:15:15 2016 +0200 2.3 @@ -204,6 +204,7 @@ 2.4 iret 2.5 2.6 unpack: 2.7 +#define NO_LZMA_HEADER 2.8 #include "unlzma.S" 2.9 2.10 end:
3.1 --- a/syslinux/stuff/iso2exe/boot.c Sat Sep 03 19:40:30 2016 +0200 3.2 +++ b/syslinux/stuff/iso2exe/boot.c Mon Sep 05 18:15:15 2016 +0200 3.3 @@ -190,7 +190,7 @@ 3.4 } 3.5 if (cmdline) { 3.6 char *last; 3.7 - for (s = cmdline; *s && *s != '\r' && *s != '\n'; s++) 3.8 + for (s = last = cmdline; *s && *s != '\r' && *s != '\n'; s++) 3.9 if (*s != ' ') last = s; 3.10 *++last = 0; 3.11 }
4.1 --- a/syslinux/stuff/iso2exe/libdos.c Sat Sep 03 19:40:30 2016 +0200 4.2 +++ b/syslinux/stuff/iso2exe/libdos.c Mon Sep 05 18:15:15 2016 +0200 4.3 @@ -193,18 +193,22 @@ 4.4 void copycmdline(char store[]) 4.5 { 4.6 #asm 4.7 + pop cx 4.8 + pop ax 4.9 + push ax 4.10 + push cx 4.11 push si 4.12 push di 4.13 push ds 4.14 pop es 4.15 mov si, #0x81 4.16 + xchg ax, di 4.17 space: 4.18 seg cs 4.19 lodsb 4.20 cmp al, #0x20 4.21 je space 4.22 dec si 4.23 - mov di, [bp+4] 4.24 mov cx, #0x80/2 4.25 rep 4.26 seg cs