wok-6.x diff linux-cloop/stuff/cloop.u @ rev 18828
cloop: deduplicate support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jan 17 14:10:13 2016 +0100 (2016-01-17) |
parents | 1ef3f82b0095 |
children | 74ce1799eee7 |
line diff
1.1 --- a/linux-cloop/stuff/cloop.u Thu Nov 20 18:30:47 2014 +0100 1.2 +++ b/linux-cloop/stuff/cloop.u Sun Jan 17 14:10:13 2016 +0100 1.3 @@ -1,6 +1,6 @@ 1.4 --- cloop.h 1.5 +++ cloop.h 1.6 -@@ -20,6 +20,75 @@ 1.7 +@@ -20,6 +20,80 @@ 1.8 /* data_index (num_blocks 64bit pointers, network order)... */ 1.9 /* compressed data (gzip block compressed format)... */ 1.10 1.11 @@ -67,7 +67,12 @@ 1.12 + offsets[i].size = ntohl(ofs32[i]); 1.13 + for (i = 0, j = sizeof(struct cloop_head); i < n; i++) { 1.14 + offsets[i].offset = j; 1.15 -+ j += offsets[i].size; 1.16 ++ if (offsets[i].size & 0x80000000) { 1.17 ++ unsigned long k = offset[i].size & 0x7FFFFFFF; 1.18 ++ offsets[i].offset = offsets[k].offset; 1.19 ++ offsets[i].size = offsets[k].size; 1.20 ++ } 1.21 ++ else j += offsets[i].size; 1.22 + } 1.23 + return (char *) "32BE v3.0"; 1.24 + }