wok-current diff linld/stuff/src/LINLD.CPP @ rev 24019

syslinux: fix build
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 28 16:32:57 2021 +0000 (2021-02-28)
parents 14ca5e18cfd9
children 217c02cbbe8d
line diff
     1.1 --- a/linld/stuff/src/LINLD.CPP	Thu Feb 25 10:56:54 2021 +0000
     1.2 +++ b/linld/stuff/src/LINLD.CPP	Sun Feb 28 16:32:57 2021 +0000
     1.3 @@ -16,9 +16,15 @@
     1.4  
     1.5  inline void syntax() {
     1.6      die("Syntax:" NL
     1.7 -        "LINLD [image=file] [initrd=files] [vga=mode] [root=num] [mem=max] [cl=cmdline] [iso=file] ..." NL
     1.8 +        "LINLD [image=file] [initrd=files] [vga=mode] [root=num] [mem=max] [cl=cmdline] "
     1.9 +#ifdef ISO9660
    1.10 +	"[iso=file] "
    1.11 +#endif
    1.12 +	"..." NL
    1.13          "vga mode: ask,extended,normal or dec/oct/hex number" NL
    1.14 +#ifdef CPU64
    1.15          "-64 for cpu64 only" NL
    1.16 +#endif
    1.17          "Defaults:" NL
    1.18          "\timage=bzImage" NL
    1.19          "\tinitrd,vga,root=(void)" NL
    1.20 @@ -50,11 +56,17 @@
    1.21      if (!*++argv) syntax();
    1.22      const char **clp = &cmdline;
    1.23      do {
    1.24 +#ifdef CPU64
    1.25          if ((*(u16 *)*argv|2) == 0x362F) {	// -64 /64
    1.26  	    if (cpuhaslm() != 0) continue;
    1.27  	    exit();
    1.28  	}
    1.29 +#endif
    1.30 +#ifdef ISO9660
    1.31  	if (argstr(*argv,"cl|image|initrd|iso",clp) == (int) clp) continue;
    1.32 +#else
    1.33 +	if (argstr(*argv,"cl|image|initrd",clp) == (int) clp) continue;
    1.34 +#endif
    1.35  #ifdef QUICK_BOOT
    1.36  	if (argnum(*argv,"root|vga|mem|-b|-f~-q~-v~",&root_dev) >= (int) &base_himem) continue;
    1.37  #else
    1.38 @@ -68,7 +80,9 @@
    1.39  	strcatb((const char *) buf_cmdline,*argv);
    1.40      } while (*++argv);
    1.41      puts(*clp);
    1.42 +#ifdef ISO9660
    1.43      if (isofile) setiso(isofile);
    1.44 +#endif
    1.45      set_cmdline(*clp);
    1.46      load_kernel();
    1.47      load_initrd();