wok rev 23871

linld: fix isoreaddir
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jun 23 13:35:04 2020 +0000 (6 weeks ago)
parents 26195667e7c9
children d2a463a1d80c
files linld/stuff/src/ISO9660.CPP linld/stuff/src/ISOCRTL.ASM
line diff
     1.1 --- a/linld/stuff/src/ISO9660.CPP	Tue Jun 23 08:04:01 2020 +0000
     1.2 +++ b/linld/stuff/src/ISO9660.CPP	Tue Jun 23 13:35:04 2020 +0000
     1.3 @@ -65,6 +65,9 @@
     1.4  #ifdef __ROCKRIDGE
     1.5  	// p += 34 + (p[32] & -2); ?
     1.6  	p = x->buffer + 34 + ((p[32] + x->curpos) & -2);
     1.7 +#ifdef ISOHOOK
     1.8 +	x->curpos += x->entrysize;
     1.9 +#endif
    1.10  	do {
    1.11  		register len = p[2];
    1.12  		if (* (short *) p == 0x4D4E) {
    1.13 @@ -73,10 +76,10 @@
    1.14  			goto found;
    1.15  		}
    1.16  		p += len;
    1.17 -#ifndef ISOHOOK
    1.18 +#ifdef ISOHOOK
    1.19 +	} while (x->buffer + x->curpos - 2 > p);
    1.20 +#else
    1.21  	} while (x->buffer + x->curpos + x->entrysize - 2 > p);
    1.22 -#else
    1.23 -	} while (1);
    1.24  #endif
    1.25  #endif
    1.26  #ifndef ISOHOOK
    1.27 @@ -99,7 +102,9 @@
    1.28  	}
    1.29  #endif
    1.30  found:
    1.31 +#ifndef ISOHOOK
    1.32  	x->curpos += x->entrysize;
    1.33 +#endif
    1.34  	return 0;
    1.35  }
    1.36  
     2.1 --- a/linld/stuff/src/ISOCRTL.ASM	Tue Jun 23 08:04:01 2020 +0000
     2.2 +++ b/linld/stuff/src/ISOCRTL.ASM	Tue Jun 23 13:35:04 2020 +0000
     2.3 @@ -52,8 +52,8 @@
     2.4  		stosw
     2.5  		mov	ax,offset iso_close_hack
     2.6  		stosw
     2.7 -		mov	ax,offset iso_cleanup_hack
     2.8 -		stosw
     2.9 +;		mov	ax,offset iso_cleanup_hack
    2.10 +;		stosw
    2.11  		global	@_cpuhaslm$qv:near
    2.12  @_cpuhaslm$qv:
    2.13  		mov	ax,[132h]
    2.14 @@ -263,9 +263,10 @@
    2.15  		sbb	dx,[(word _isostate.fileofs)+2]
    2.16  		ret
    2.17  
    2.18 -iso_cleanup_hack:
    2.19 -		mov	ah,3Eh		; close file
    2.20 -		jmp	dosfd
    2.21 +;iso_cleanup_hack:
    2.22 +;		mov	ah,3Eh		; close file
    2.23 +;		jmp	dosfd
    2.24 +
    2.25  	ifdef	NO386
    2.26          global  N_LXLSH@ES:near
    2.27  N_LXLSH@ES: