summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-06 14:30:00 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-06 14:40:38 +0200
commita3199d91f395c35accffcf1b037bc398a5a41205 (patch)
tree8a221cc6502dacecb95136c9961118ecf8aec736 /cpukit
parenta76c31e13dfc6345b12f7de4dedeebbff514e3aa (diff)
downloadrtems-a3199d91f395c35accffcf1b037bc398a5a41205.tar.bz2
dosfs: Fix fat_file_update()
Do not update the non-existant meta-data of the root directory. Close #2944.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libfs/src/dosfs/fat_file.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/cpukit/libfs/src/dosfs/fat_file.c b/cpukit/libfs/src/dosfs/fat_file.c
index c65c758214..e7f593ec1f 100644
--- a/cpukit/libfs/src/dosfs/fat_file.c
+++ b/cpukit/libfs/src/dosfs/fat_file.c
@@ -168,11 +168,9 @@ fat_file_update(fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd)
{
int ret_rc = RC_OK;
- /*
- * if fat-file descriptor is not marked as "removed", synchronize
- * size, first cluster number, write time and date fields of the file
- */
- if (!FAT_FILE_IS_REMOVED(fat_fd) && FAT_FILE_HAS_META_DATA_CHANGED(fat_fd))
+ if (!FAT_FILE_IS_REMOVED(fat_fd) &&
+ FAT_FILE_HAS_META_DATA_CHANGED(fat_fd) &&
+ !FAT_FD_OF_ROOT_DIR(fat_fd))
{
int rc;