wok-6.x diff fusecloop/stuff/fusecloop.u @ rev 17168

linux-cloop: 4Gb+ support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 23 10:35:20 2014 +0200 (2014-09-23)
parents 1e434243dc31
children 56359f299d0a
line diff
     1.1 --- a/fusecloop/stuff/fusecloop.u	Tue Jun 11 09:04:29 2013 +0200
     1.2 +++ b/fusecloop/stuff/fusecloop.u	Tue Sep 23 10:35:20 2014 +0200
     1.3 @@ -1,6 +1,6 @@
     1.4  --- compressed_loop.h
     1.5  +++ compressed_loop.h
     1.6 -@@ -41,6 +41,74 @@
     1.7 +@@ -41,6 +41,75 @@
     1.8   /* data_index (num_blocks 64bit pointers, network order)...      */
     1.9   /* compressed data (gzip block compressed format)...             */
    1.10   
    1.11 @@ -60,7 +60,8 @@
    1.12  +		return (char *) "32BE v0.68";
    1.13  +	}
    1.14  +	else { /* V3.0 */
    1.15 -+		int i, j;
    1.16 ++		int i;
    1.17 ++		loff_t j;
    1.18  +		
    1.19  +		for (i = n; i-- > 0; )
    1.20  +			offsets[i].size = ntohl(ofs32[i]); 
    1.21 @@ -110,7 +111,7 @@
    1.22  +	len = ntohl(tail.table_size);
    1.23  +	toclen = (ntohl(tail.index_size) & 255) * c->numblocks;
    1.24  +	OP(lseek(c->fh, end - sizeof(tail) - len, SEEK_SET));
    1.25 -+        ALLOC(c->toc,c->tocsize);
    1.26 ++        ALLOC(c->toc, sizeof(*c->toc) * c->numblocks);
    1.27  +        ALLOC(p,len);
    1.28  +        OP(read_all(c->fh,p,len));  /* read Data Index */
    1.29  +	if (uncompress((void *)c->toc,&toclen,p,len) != Z_OK)