From cf4f962cc0debb56a1a1c6f6ed844adeb09599e4 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 23 Oct 2014 08:21:26 +0200 Subject: dosfs: Write meta-data only if it changed --- cpukit/libfs/src/dosfs/msdos_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpukit/libfs/src/dosfs/msdos_file.c') diff --git a/cpukit/libfs/src/dosfs/msdos_file.c b/cpukit/libfs/src/dosfs/msdos_file.c index b678d8459c..7a092721ae 100644 --- a/cpukit/libfs/src/dosfs/msdos_file.c +++ b/cpukit/libfs/src/dosfs/msdos_file.c @@ -108,7 +108,7 @@ msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count) */ iop->offset += ret; if (iop->offset > fat_fd->fat_file_size) - fat_fd->fat_file_size = iop->offset; + fat_file_set_file_size(fat_fd, (uint32_t) iop->offset); if (ret > 0) fat_file_set_ctime_mtime(fat_fd, time(NULL)); @@ -202,7 +202,7 @@ msdos_file_ftruncate(rtems_libio_t *iop, off_t length) if (rc == RC_OK) { - fat_fd->fat_file_size = length; + fat_file_set_file_size(fat_fd, length); fat_file_set_ctime_mtime(fat_fd, time(NULL)); } -- cgit v1.2.3