+
+ if (h->msglvl >= 2) {
+ char *name = windows_utf16_to_utf8 (h->hdr->name, 64);
+
+ fprintf (stderr,
+ "hivex_open: header fields:\n"
+ " file version %" PRIu32 ".%" PRIu32 "\n"
+ " sequence nos %" PRIu32 " %" PRIu32 "\n"
+ " (sequences nos should match if hive was synched at shutdown)\n"
+ " original file name %s\n"
+ " (only 32 chars are stored, name is probably truncated)\n"
+ " root offset 0x%x + 0x1000\n"
+ " end of last page 0x%x + 0x1000 (total file size 0x%zx)\n"
+ " checksum 0x%x (calculated 0x%x)\n",
+ major_ver, le32toh (h->hdr->minor_ver),
+ le32toh (h->hdr->sequence1), le32toh (h->hdr->sequence2),
+ name ? name : "(conversion failed)",
+ le32toh (h->hdr->offset),
+ le32toh (h->hdr->blocks), h->size,
+ le32toh (h->hdr->csum), sum);
+ free (name);
+ }