summaryrefslogtreecommitdiff
path: root/common/image.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-04-20 18:37:18 (GMT)
committerSimon Glass <sjg@chromium.org>2015-05-06 02:58:20 (GMT)
commit9f9276c34cbbf67fd1b3788f0be326b47fc69123 (patch)
tree90e621bf20886ea798cddeae809422c530af476a /common/image.c
parent199e87c340bdd69a89e22f12e1201d67767e91a8 (diff)
downloadu-boot-fsl-qoriq-9f9276c34cbbf67fd1b3788f0be326b47fc69123.tar.xz
dm: rtc: Rename to_tm() to rtc_to_tm() and add error code
Rename this function so that it is clear that it is provided by the RTC. Also return an error when it cannot function as expected. This is unlikely to occur since it works for dates since 1752 and many RTCs do not support such old dates. Still it is better to be accurate. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'common/image.c')
-rw-r--r--common/image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/image.c b/common/image.c
index abc0d89..fdec496 100644
--- a/common/image.c
+++ b/common/image.c
@@ -533,7 +533,7 @@ void genimg_print_time(time_t timestamp)
#ifndef USE_HOSTCC
struct rtc_time tm;
- to_tm(timestamp, &tm);
+ rtc_to_tm(timestamp, &tm);
printf("%4d-%02d-%02d %2d:%02d:%02d UTC\n",
tm.tm_year, tm.tm_mon, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);