summaryrefslogtreecommitdiff
path: root/tools/imagetool.c
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2018-06-20 23:10:51 +0300
committerTom Rini <trini@konsulko.com>2018-07-10 23:56:00 +0300
commit87925df2b3f8d308addc5c0fe5a22ae9712ca5ec (patch)
treeed865fbf644bf7f167c6227d19430e584f17156e /tools/imagetool.c
parent67a2616af18bbb38905b90ed1c6b66659671e1da (diff)
downloadu-boot-87925df2b3f8d308addc5c0fe5a22ae9712ca5ec.tar.xz
mkimage: Refactor imagetool_get_source_date to take command name
So we can use imagetool_get_source_date() from callers who do not have the image tool params struct, just pass in the command name for the error message. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by: Simon Glass <sjg@chromum.org>
Diffstat (limited to 'tools/imagetool.c')
-rw-r--r--tools/imagetool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/imagetool.c b/tools/imagetool.c
index a4e39b24bc..b3e628f612 100644
--- a/tools/imagetool.c
+++ b/tools/imagetool.c
@@ -116,7 +116,7 @@ int imagetool_get_filesize(struct image_tool_params *params, const char *fname)
}
time_t imagetool_get_source_date(
- struct image_tool_params *params,
+ const char *cmdname,
time_t fallback)
{
char *source_date_epoch = getenv("SOURCE_DATE_EPOCH");
@@ -128,7 +128,7 @@ time_t imagetool_get_source_date(
if (gmtime(&time) == NULL) {
fprintf(stderr, "%s: SOURCE_DATE_EPOCH is not valid\n",
- params->cmdname);
+ cmdname);
time = 0;
}