wok-next diff syslinux/stuff/iso2exe/bootlinux.c @ rev 16025
syslinux/iso2exe: fix cmdline
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 07 10:50:10 2014 +0000 (2014-03-07) |
parents | 592369f78d12 |
children | 8cf93f4aedd1 |
line diff
1.1 --- a/syslinux/stuff/iso2exe/bootlinux.c Thu Mar 06 19:57:41 2014 +0000 1.2 +++ b/syslinux/stuff/iso2exe/bootlinux.c Fri Mar 07 10:50:10 2014 +0000 1.3 @@ -24,7 +24,7 @@ 1.4 1.5 #define PAGE_BITS 12 1.6 #define PAGE_SIZE 4096 1.7 -#define BUFFERSZ 2048 // lower than mix setup 1.8 +#define BUFFERSZ 2048 // lower than min setup 1.9 static char buffer[BUFFERSZ]; 1.10 static unsigned long initrd_addr = 0, initrd_size; 1.11 1.12 @@ -289,17 +289,6 @@ 1.13 #asm 1.14 push #SETUP_SEGMENT 1.15 pop es 1.16 - push es 1.17 - pop ss 1.18 - mov sp, #CMDLINE_OFFSET 1.19 - mov eax, _initrd_addr 1.20 - or eax, eax 1.21 - jz no_initrd 1.22 - mov di, #0x218 1.23 - stosd 1.24 - mov eax, _initrd_size 1.25 - stosd 1.26 -no_initrd: 1.27 #endasm 1.28 if (cmdline) { 1.29 if (setup_version <= 0x201) { 1.30 @@ -328,6 +317,20 @@ 1.31 jne copy 1.32 #endasm 1.33 } 1.34 + if (setup_version >= 0x200) { 1.35 +#asm 1.36 + mov eax, _initrd_addr 1.37 + mov di, #0x218 1.38 + stosd 1.39 + mov eax, _initrd_size 1.40 + stosd 1.41 +#endasm 1.42 + } 1.43 +#asm 1.44 + push es 1.45 + pop ss 1.46 + mov sp, #CMDLINE_OFFSET 1.47 +#endasm 1.48 #ifdef ZIMAGE_SUPPORT 1.49 if (zimage) { 1.50 #asm