wok-next diff linld/stuff/src/TAZBOOT.CPP @ rev 20462
Combine receipts
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Mar 06 03:00:01 2018 +0200 (2018-03-06) |
parents | 9107c8697bd1 |
children |
line diff
1.1 --- a/linld/stuff/src/TAZBOOT.CPP Fri Mar 17 15:18:10 2017 +0100 1.2 +++ b/linld/stuff/src/TAZBOOT.CPP Tue Mar 06 03:00:01 2018 +0200 1.3 @@ -83,10 +83,10 @@ 1.4 if (iso[1] && !strcmp(mode = iso[1], "text")) 1.5 init = ""; 1.6 do { 1.7 - if ((isoopen(mode) >= 0 && ++noauto) || // custom 1.8 + if ((isoopen(mode) >= 0 && ++noauto != 0) || // custom 1.9 isoopen("bzImage") >= 0 || // SliTaz 1.10 isoopen("vmlinuz") >= 0 || // misc 1.11 - (isoopen("linux") >= 0 && ++isknoppix)) { 1.12 + (isoopen("linux") >= 0 && ++isknoppix != 0)) { 1.13 magic = kver2ul(isokernel()); 1.14 break; 1.15 } 1.16 @@ -100,7 +100,7 @@ 1.17 c = x->filename[6]; 1.18 } 1.19 1.20 - strcatb(_cmdline,"rw root=/dev/null autologin bootfrom="); 1.21 + strcatb(_cmdline," rw root=/dev/null autologin bootfrom="); 1.22 strcat(_cmdline,*iso); 1.23 if (magic < 0x20630) 1.24 init = ""; // Does not support multiple initramfs 1.25 @@ -117,19 +117,20 @@ 1.26 } 1.27 } 1.28 else if (magic > 0) { 1.29 - char *initrd = fallback; 1.30 - static const unsigned long initrddesc = 20L; 1.31 + char *initrdfilename = fallback; 1.32 + static const unsigned long initrddesc = 18L; 1.33 1.34 if (rootfs[0]) { 1.35 - initrd = rootfs; 1.36 + initrdfilename = rootfs; 1.37 if (rootfs[6] != '.' && isoopen("rootfs.gz") >= 0) 1.38 addinitrd(); // for loram 1.39 } 1.40 - if (isoopen(initrd) >= 0) { 1.41 + if (isoopen(initrdfilename) >= 0) { 1.42 addinitrd(); 1.43 } 1.44 if (*init && isolseek(&initrddesc) != -1) { 1.45 - read(x->fd, &x->fileofs, 8); // and x->filesize 1.46 + read(x->fd, &x->filemod, 10); // + x->fileofs & x->filesize 1.47 + magic = x->filemod; 1.48 x->fileofs &= 0xFFFFL; 1.49 x->fileofs -= 0xC0L + (x->filesize &= 0xFFFF); 1.50 if (((short *) &x->fileofs)[1] == 0) addinitrd(); 1.51 @@ -189,6 +190,7 @@ 1.52 s++; 1.53 set_kernel: 1.54 s += 6; 1.55 + set_kernelz: 1.56 kernel_name = s; 1.57 } 1.58 else if (strhead(s,"image=") == 0) { 1.59 @@ -225,7 +227,7 @@ 1.60 goto next; 1.61 default: 1.62 if(i == 1 && fileattr(s) != -1) { 1.63 - goto set_kernel; 1.64 + goto set_kernelz; 1.65 } 1.66 else { 1.67 if(strhead(s,"root=") == 0) {