From c9f2308a1d4401ceefaac47b1ea851530d07e47d Mon Sep 17 00:00:00 2001 From: James Buren Date: Sat, 3 Jul 2021 00:19:58 +0000 Subject: fat: move fattime_mktime to timefuncs This moves the time conversion function to timefuncs since it has uses on ports that don't use the FAT driver. This function has no dependency on the FAT driver as it is so this should not cause any issues. To reflect this separation the function was renamed to dostime_mktime since it is really for DOS timestamps. The places where it was used have also been updated. Change-Id: Id98b1448d5c6fcda286846e1d2c736db682bfb52 --- firmware/common/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'firmware/common/dir.c') diff --git a/firmware/common/dir.c b/firmware/common/dir.c index f89129ae34..245947b134 100644 --- a/firmware/common/dir.c +++ b/firmware/common/dir.c @@ -26,6 +26,7 @@ #include "debug.h" #include "dir.h" #include "pathfuncs.h" +#include "timefuncs.h" #include "fileobj_mgr.h" #include "dircache_redirect.h" @@ -406,7 +407,7 @@ struct dirinfo dir_get_info(DIR *dirp, struct dirent *entry) { .attribute = entry->info.attr, .size = entry->info.size, - .mtime = fattime_mktime(entry->info.wrtdate, entry->info.wrttime), + .mtime = dostime_mktime(entry->info.wrtdate, entry->info.wrttime), }; file_error: -- cgit v1.2.3