diff mbox

[U-Boot,3/3] image: Display FIT timestamp when booting

Message ID 1374030601-13568-3-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass July 17, 2013, 3:10 a.m. UTC
The timestamp is shown in fit_print_contents() but for some reason not
in fit_image_print(). This seems to be an oversight, since it is the latter
which is used by bootm.

Add timestamp printing in this case.

(There is code duplication in these two function, for looking at in a future
patch).

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 common/image-fit.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Tom Rini Aug. 18, 2013, 9:49 p.m. UTC | #1
On Tue, Jul 16, 2013 at 08:10:01PM -0700, Simon Glass wrote:

> The timestamp is shown in fit_print_contents() but for some reason not
> in fit_image_print(). This seems to be an oversight, since it is the latter
> which is used by bootm.
> 
> Add timestamp printing in this case.
> 
> (There is code duplication in these two function, for looking at in a future
> patch).
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/common/image-fit.c b/common/image-fit.c
index e28dd05..bbb4cad 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -359,6 +359,17 @@  void fit_image_print(const void *fit, int image_noffset, const char *p)
 	else
 		printf("%s\n", desc);
 
+	if (IMAGE_ENABLE_TIMESTAMP) {
+		time_t timestamp;
+
+		ret = fit_get_timestamp(fit, 0, &timestamp);
+		printf("%s  Created:      ", p);
+		if (ret)
+			printf("unavailable\n");
+		else
+			genimg_print_time(timestamp);
+	}
+
 	fit_image_get_type(fit, image_noffset, &type);
 	printf("%s  Type:         %s\n", p, genimg_get_type_name(type));