return (length + 7) & ~7;
}
+u64 dentry_correct_total_length(const struct dentry *dentry)
+{
+ return __dentry_total_length(dentry,
+ dentry_correct_length_unaligned(dentry));
+}
+
/* Real length of a dentry, including the alternate data stream entries, which
* are not included in the dentry->length field... */
u64 dentry_total_length(const struct dentry *dentry)
/* Advance the subdir offset by the amount of space the children
* of this dentry take up. */
do {
- *subdir_offset_p += __dentry_total_length(child,
- dentry_correct_length(child));
+ *subdir_offset_p += dentry_correct_total_length(child);
child = child->next;
} while (child != dentry->children);
{
const u8 *hash;
struct lookup_table_entry *lte;
+ time_t time;
+ char *p;
printf("[DENTRY]\n");
printf("Length = %"PRIu64"\n", dentry->length);
time_t creat_time = wim_timestamp_to_unix(dentry->creation_time);
time_t access_time = wim_timestamp_to_unix(dentry->last_access_time);
time_t mod_time = wim_timestamp_to_unix(dentry->last_write_time);
- printf("Creation Time = %s", asctime(gmtime(&creat_time)));
- printf("Last Access Time = %s", asctime(gmtime(&access_time)));
- printf("Last Write Time = %s", asctime(gmtime(&mod_time)));
+
+ time = wim_timestamp_to_unix(dentry->creation_time);
+ p = asctime(gmtime(&time));
+ *(strrchr(p, '\n')) = '\0';
+ printf("Creation Time = %s UTC\n", p);
+
+ time = wim_timestamp_to_unix(dentry->last_access_time);
+ p = asctime(gmtime(&time));
+ *(strrchr(p, '\n')) = '\0';
+ printf("Last Access Time = %s UTC\n", p);
+
+ time = wim_timestamp_to_unix(dentry->last_write_time);
+ p = asctime(gmtime(&time));
+ *(strrchr(p, '\n')) = '\0';
+ printf("Last Write Time = %s UTC\n", p);
printf("Reparse Tag = 0x%"PRIx32"\n", dentry->reparse_tag);
printf("Hard Link Group = 0x%"PRIx64"\n", dentry->hard_link);
for (unsigned i = 0; i <= dentry->num_ads; i++) {
const u8 *hash;
hash = dentry_stream_hash_unresolved(dentry, i);
- if (dentry_stream_name_len(dentry, i) && !is_zero_hash(hash)) {
+ if (!dentry_stream_name_len(dentry, i) && !is_zero_hash(hash)) {
num_unnamed_streams++;
unnamed_stream_idx = i;
}