diff options
author | Tom Rini <trini@konsulko.com> | 2021-10-08 16:02:55 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-08 16:02:55 -0400 |
commit | 94e922c76a0e1fcdead3359e340f53fd0709a963 (patch) | |
tree | 667372191c3a70cd9343180c8d7f6273afbb9ab9 /common/image-host.c | |
parent | 0caf37e973015255a3c5b9439ddb8c6aef1b5001 (diff) | |
parent | 4cb35b7a1fdf060a0839b71f6dbf8d08b1ae62e0 (diff) |
Merge branch '2021-10-08-image-cleanups'
- A large number of image file and tooling related cleanups
Diffstat (limited to 'common/image-host.c')
-rw-r--r-- | common/image-host.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/common/image-host.c b/common/image-host.c new file mode 100644 index 0000000000..20a9521948 --- /dev/null +++ b/common/image-host.c @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Image code used by host tools (and not boards) + * + * (C) Copyright 2008 Semihalf + * + * (C) Copyright 2000-2006 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#include <time.h> + +void memmove_wd(void *to, void *from, size_t len, ulong chunksz) +{ + memmove(to, from, len); +} + +void genimg_print_size(uint32_t size) +{ + printf("%d Bytes = %.2f KiB = %.2f MiB\n", size, (double)size / 1.024e3, + (double)size / 1.048576e6); +} + +void genimg_print_time(time_t timestamp) +{ + printf("%s", ctime(×tamp)); +} |