wok-next 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 1bd45ef9a523
children 56359f299d0a
files fusecloop/stuff/fusecloop.u linux-cloop/stuff/cloop.u
line diff
     1.1 --- a/fusecloop/stuff/fusecloop.u	Mon Sep 22 21:15:12 2014 +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)
     2.1 --- a/linux-cloop/stuff/cloop.u	Mon Sep 22 21:15:12 2014 +0200
     2.2 +++ b/linux-cloop/stuff/cloop.u	Tue Sep 23 10:35:20 2014 +0200
     2.3 @@ -1,6 +1,6 @@
     2.4  --- cloop.h
     2.5  +++ cloop.h
     2.6 -@@ -20,6 +20,74 @@
     2.7 +@@ -20,6 +20,75 @@
     2.8   /* data_index (num_blocks 64bit pointers, network order)...      */
     2.9   /* compressed data (gzip block compressed format)...             */
    2.10   
    2.11 @@ -60,7 +60,8 @@
    2.12  +		return (char *) "32BE v0.68";
    2.13  +	}
    2.14  +	else { /* V3.0 */
    2.15 -+		int i, j;
    2.16 ++		int i;
    2.17 ++		loff_t j;
    2.18  +		
    2.19  +		for (i = n; i-- > 0; )
    2.20  +			offsets[i].size = ntohl(ofs32[i]);