diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-10-20 09:33:34 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-10-23 10:21:25 +0200 |
commit | a7eaaae85b9b536b4d77c86e39c138d7c4f8f8fc (patch) | |
tree | e345db37897c534dd4885276695f8a7492af1a4d /cpukit/libfs/src/dosfs/msdos_dir.c | |
parent | bsp/stm32f4: Add header files (diff) | |
download | rtems-a7eaaae85b9b536b4d77c86e39c138d7c4f8f8fc.tar.bz2 |
dosfs: Support ctime and mtime
Implement ctime and mtime updates according to POSIX. The ctime is
mapped to the FAT create time and date. The mtime is mapped to the FAT
last modified time and date. For the atime use the mtime for
simplicity.
Diffstat (limited to 'cpukit/libfs/src/dosfs/msdos_dir.c')
-rw-r--r-- | cpukit/libfs/src/dosfs/msdos_dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_dir.c b/cpukit/libfs/src/dosfs/msdos_dir.c index f311d89734..b10ed9edfc 100644 --- a/cpukit/libfs/src/dosfs/msdos_dir.c +++ b/cpukit/libfs/src/dosfs/msdos_dir.c @@ -403,6 +403,8 @@ msdos_dir_stat( buf->st_size = fat_fd->fat_file_size; buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS; buf->st_blksize = fs_info->fat.vol.bps; + buf->st_atime = fat_fd->mtime; + buf->st_ctime = fat_fd->ctime; buf->st_mtime = fat_fd->mtime; rtems_semaphore_release(fs_info->vol_sema); |