wok-current diff syslinux/stuff/iso2exe/boot.c @ rev 16012

syslinux/iso2exe: access both local and isofs namespaces
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Mar 04 21:00:29 2014 +0000 (2014-03-04)
parents 647e4ebbbcae
children 592369f78d12
line diff
     1.1 --- a/syslinux/stuff/iso2exe/boot.c	Tue Mar 04 09:23:30 2014 +0000
     1.2 +++ b/syslinux/stuff/iso2exe/boot.c	Tue Mar 04 21:00:29 2014 +0000
     1.3 @@ -15,7 +15,7 @@
     1.4  Examples for tazboot.cmd:\n\n\
     1.5    iso=\\isos\\slitaz-4.0.iso\n\
     1.6    kernel=boot/bzImage\n\
     1.7 -  initrd=boot/rootfs4.gz,boot/rootfs3.gz,boot/rootfs2.gz,boot/rootfs1.gz\n\
     1.8 +  initrd=boot/rootfs4.gz,boot/rootfs3.gz,boot/rootfs2.gz,boot/rootfs1.gz,\\slitaz\\extrafs.gz\n\
     1.9    rw root=/dev/null vga=normal autologin\n\n\
    1.10    kernel=\\slitaz\\vmlinuz\n\
    1.11    root=/dev/sda5 ro\n",iso,iso,iso);
    1.12 @@ -26,7 +26,7 @@
    1.13  {
    1.14  	char *init = "rdinit=/init.exe", *mode="menu";
    1.15  	char c, rootfs[16], cmdline[256];
    1.16 -	int fd, restart;
    1.17 +	int restart;
    1.18  	unsigned long magic;
    1.19  	
    1.20  	if (isoreset(*iso) || isoopen("boot")) return;
    1.21 @@ -75,6 +75,11 @@
    1.22  		while (*s && *s != '\r' && *s != '\n') s++;
    1.23  		*s = 0;
    1.24  	}
    1.25 +	if (*file == '\\') {
    1.26 +		static fd = -1;
    1.27 +		if (fd >= 0) close(fd);
    1.28 +		return open(file, O_RDONLY);
    1.29 +	}
    1.30  	if (iso) {
    1.31  		isoreset(iso);
    1.32  		return isoopen(file);