Virtual ISO: Make the birthtime check a bit more readable
This commit is contained in:
@@ -531,14 +531,13 @@ viso_fill_dir_record(uint8_t *data, viso_entry_t *entry, int format, int type)
|
|||||||
VISO_LBE_32(p, dev); /* device number (low 32 bits) */
|
VISO_LBE_32(p, dev); /* device number (low 32 bits) */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
int times = (VISO_TIME_VALID(entry->stats.st_mtime) << 1) | /* modify */
|
int times =
|
||||||
(VISO_TIME_VALID(entry->stats.st_atime) << 2) | /* access */
|
|
||||||
(VISO_TIME_VALID(entry->stats.st_ctime) << 3) | /* attributes */
|
|
||||||
#ifdef st_birthtime
|
#ifdef st_birthtime
|
||||||
(VISO_TIME_VALID(entry->stats.st_birthtime) << 0); /* creation (assume the platform remaps st_birthtime to something else) */
|
(VISO_TIME_VALID(entry->stats.st_birthtime) << 0) | /* creation (hack: assume the platform remaps st_birthtime at header level) */
|
||||||
#else
|
|
||||||
0;
|
|
||||||
#endif
|
#endif
|
||||||
|
(VISO_TIME_VALID(entry->stats.st_mtime) << 1) | /* modify */
|
||||||
|
(VISO_TIME_VALID(entry->stats.st_atime) << 2) | /* access */
|
||||||
|
(VISO_TIME_VALID(entry->stats.st_ctime) << 3); /* attributes */
|
||||||
if (times) {
|
if (times) {
|
||||||
*q |= 0x80; /* TF = timestamps */
|
*q |= 0x80; /* TF = timestamps */
|
||||||
*p++ = 'T';
|
*p++ = 'T';
|
||||||
|
Reference in New Issue
Block a user