From 4064c8257c0865b3dacae09a6da3de0db3c4a029 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 17 Nov 2011 03:59:54 +0000 Subject: [PATCH] clock_gettime() not settime() in FAT time logic git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4094 42af7a65-404d-4744-a932-0658087f49c3 --- ChangeLog | 2 ++ fs/fat/fs_fat32util.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1563caf3fab..ef7cba2117e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2214,3 +2214,5 @@ from other directories. When formatted by Windows, it is not initialized at all. Some additional special handling is required to initialize the root directory entry to interoperate correctly with windows. + * fs/fat/fs_fat32util.c: In fat_systime2fattime(void) should be + clock_gettime() and not clock_gettime() (Thanks to David Sidrane). diff --git a/fs/fat/fs_fat32util.c b/fs/fat/fs_fat32util.c index 12c2394f064..bef9b45a7a9 100644 --- a/fs/fat/fs_fat32util.c +++ b/fs/fat/fs_fat32util.c @@ -418,7 +418,7 @@ uint32_t fat_systime2fattime(void) /* Get the current time in seconds and nanoseconds */ - ret = clock_settime(CLOCK_REALTIME, &ts); + ret = clock_gettime(CLOCK_REALTIME, &ts); if (ret == OK) { /* Break done the seconds in date and time units */