wok-next diff syslinux/stuff/iso2exe/iso9660.c @ rev 18775
syslinux/isohybrid.exe: add -a & -i support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jan 01 10:53:50 2016 +0100 (2016-01-01) |
parents | 6aed6fc5819d |
children |
line diff
1.1 --- a/syslinux/stuff/iso2exe/iso9660.c Sat Dec 27 17:56:57 2014 +0100 1.2 +++ b/syslinux/stuff/iso2exe/iso9660.c Fri Jan 01 10:53:50 2016 +0100 1.3 @@ -1,11 +1,14 @@ 1.4 #include <sys/types.h> 1.5 #include <fcntl.h> 1.6 #include <stdio.h> 1.7 +#include <string.h> 1.8 #include "iso9660.h" 1.9 #define __ROCKRIDGE 1.10 +#ifdef __AS386_16__ 1.11 #asm 1.12 use16 86 1.13 #endasm 1.14 +#endif 1.15 1.16 char *isofilename; 1.17 unsigned long isofileofs, isofilesize; 1.18 @@ -69,7 +72,7 @@ 1.19 dirsize = isodirsize; 1.20 pos = SECTORSZ; 1.21 } 1.22 - if (pos >= SECTORSZ) { 1.23 + if (pos >= SECTORSZ || * (short *) (buffer + pos) == 0) { 1.24 if (dirsize < SECTORSZ) return -1; 1.25 readsector(dirofs); 1.26 dirofs += SECTORSZ; 1.27 @@ -124,6 +127,9 @@ 1.28 return 0; 1.29 } 1.30 1.31 +#ifndef __AS386_16__ 1.32 +#define cpuhaslm() (0) 1.33 +#else 1.34 static int cpuhaslm(void) 1.35 { 1.36 #asm 1.37 @@ -164,6 +170,7 @@ 1.38 not386: 1.39 #endasm 1.40 } 1.41 +#endif 1.42 1.43 #define IS_DIR(x)( ((x) & ~0777) == 040000) 1.44 int isoopen(char *filename) 1.45 @@ -187,7 +194,7 @@ 1.46 char *n = name, *i = isofilename; 1.47 if (_64bits) { 1.48 int len = strlen(name); 1.49 - if (strncmp(name, isofilename), len) continue; 1.50 + if (strncmp(name, isofilename, len)) continue; 1.51 n = "64"; 1.52 i += len; 1.53 }