From: Tollef Fog Heen Date: Sun, 22 Apr 2012 13:15:17 +0000 (+0200) Subject: Fix fr310xt case which has a working clock X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f41e139c1d97bf6e339b59f358e7e67d9522afb8;p=gant Fix fr310xt case which has a working clock --- diff --git a/fr60.c b/fr60.c index 8a18c4c..00ff9aa 100644 --- a/fr60.c +++ b/fr60.c @@ -319,7 +319,8 @@ decode_antfs_dir(const uchar* blast, uint blsize) assert(sizeof(struct antfs_dir_header) == ANTFSHEADERSIZE); memcpy(&hdr, blast + 24, ANTFSHEADERSIZE); - if (hdr.modified_time < 0x0FFFFFFF) + printf("time format: %d\n", hdr.time_format); + if (hdr.modified_time < 0x0FFFFFFF && hdr.modified_time > 0) clock_offset = time(NULL) - EPOCH_OFFSET - hdr.system_time; printf("system time: %d (offset: %d)\n", hdr.system_time, clock_offset); format_time(textual_time, "%c", 256, hdr.modified_time);