volume header date/time

git-svn-id: https://profuse.googlecode.com/svn/trunk@27 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
ksherlock 2009-01-24 21:32:41 +00:00
parent 0b5ef674f2
commit 23d9d31132
3 changed files with 7 additions and 3 deletions

View File

@ -184,8 +184,11 @@ VolumeEntry::VolumeEntry(const void *data)
// 0x14--0x1b reserved
//creation = timeToUnix(load16(&cp[0x18]), load16(&cp[0x1a]));
creation = timeToUnix(load16(&cp[0x18]), load16(&cp[0x1a]));
last_mod = timeToUnix(load16(&cp[0x12]), load16(&cp[0x14]));
if (last_mod == 0) last_mod = creation;
//version = cp[0x1c];
//min_version = cp[0x1d];

1
File.h
View File

@ -106,6 +106,7 @@ public:
unsigned name_length;
char volume_name[15+1];
time_t creation;
time_t last_mod;
//unsigned version;
//unsigned min_version;
unsigned access;

View File

@ -89,8 +89,8 @@ int prodos_stat(const VolumeEntry &v, struct stat *st)
#ifdef HAVE_STAT_BIRTHTIME
st->st_birthtime = v.creation;
#endif
st->st_mtime = v.creation;
st->st_atime = v.creation;
st->st_mtime = v.last_mod;
st->st_atime = v.last_mod;
st->st_nlink = v.file_count + 1;
st->st_size = BLOCK_SIZE;