# HG changeset patch # User Pascal Bellard # Date 1411461320 -7200 # Node ID ade6b9da6804aff2d9ac07c88ec14928aadd2c1c # Parent 1bd45ef9a5236b668d0ebbe5ad20bad0eba071c3 linux-cloop: 4Gb+ support diff -r 1bd45ef9a523 -r ade6b9da6804 fusecloop/stuff/fusecloop.u --- a/fusecloop/stuff/fusecloop.u Mon Sep 22 21:15:12 2014 +0200 +++ b/fusecloop/stuff/fusecloop.u Tue Sep 23 10:35:20 2014 +0200 @@ -1,6 +1,6 @@ --- compressed_loop.h +++ compressed_loop.h -@@ -41,6 +41,74 @@ +@@ -41,6 +41,75 @@ /* data_index (num_blocks 64bit pointers, network order)... */ /* compressed data (gzip block compressed format)... */ @@ -60,7 +60,8 @@ + return (char *) "32BE v0.68"; + } + else { /* V3.0 */ -+ int i, j; ++ int i; ++ loff_t j; + + for (i = n; i-- > 0; ) + offsets[i].size = ntohl(ofs32[i]); @@ -110,7 +111,7 @@ + len = ntohl(tail.table_size); + toclen = (ntohl(tail.index_size) & 255) * c->numblocks; + OP(lseek(c->fh, end - sizeof(tail) - len, SEEK_SET)); -+ ALLOC(c->toc,c->tocsize); ++ ALLOC(c->toc, sizeof(*c->toc) * c->numblocks); + ALLOC(p,len); + OP(read_all(c->fh,p,len)); /* read Data Index */ + if (uncompress((void *)c->toc,&toclen,p,len) != Z_OK) diff -r 1bd45ef9a523 -r ade6b9da6804 linux-cloop/stuff/cloop.u --- a/linux-cloop/stuff/cloop.u Mon Sep 22 21:15:12 2014 +0200 +++ b/linux-cloop/stuff/cloop.u Tue Sep 23 10:35:20 2014 +0200 @@ -1,6 +1,6 @@ --- cloop.h +++ cloop.h -@@ -20,6 +20,74 @@ +@@ -20,6 +20,75 @@ /* data_index (num_blocks 64bit pointers, network order)... */ /* compressed data (gzip block compressed format)... */ @@ -60,7 +60,8 @@ + return (char *) "32BE v0.68"; + } + else { /* V3.0 */ -+ int i, j; ++ int i; ++ loff_t j; + + for (i = n; i-- > 0; ) + offsets[i].size = ntohl(ofs32[i]);