- else if(version == 3){
- cow_printf("read_cow_header - broken V3 file with"
- " 64-bit layout - recovering content.\n");
-
- if(n < sizeof(header->v3_b)){
- cow_printf("read_cow_header - failed to read V3 "
- "header\n");
- goto out;
- }
-
- /* this was used until Dec2005 - 64bits are needed to represent
- * 2038+. I.e. we can safely do this truncating cast.
- *
- * Additionally, we must use ntohl() instead of ntohll(), since
- * the program used to use the former (tested - I got mtime
- * mismatch "0 vs whatever").
- *
- * Ever heard about bug-to-bug-compatibility ? ;-) */
- *mtime_out = (time32_t) ntohl(header->v3_b.mtime);
-
- *size_out = ntohll(header->v3_b.size);
- *sectorsize_out = ntohl(header->v3_b.sectorsize);
- *align_out = ntohl(header->v3_b.alignment);
- if (*align_out == 0) {
- cow_printf("read_cow_header - invalid COW header, "
- "align == 0\n");
- }
- *bitmap_offset_out = ROUND_UP(sizeof(header->v3_b), *align_out);
- file = header->v3_b.backing_file;
- }