Simon Glass | 5d3248a | 2021-09-25 07:03:17 -0600 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Image code used by host tools (and not boards) |
| 4 | * |
| 5 | * (C) Copyright 2008 Semihalf |
| 6 | * |
| 7 | * (C) Copyright 2000-2006 |
| 8 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 9 | */ |
| 10 | |
| 11 | #include <time.h> |
| 12 | |
| 13 | void memmove_wd(void *to, void *from, size_t len, ulong chunksz) |
| 14 | { |
| 15 | memmove(to, from, len); |
| 16 | } |
| 17 | |
| 18 | void genimg_print_size(uint32_t size) |
| 19 | { |
| 20 | printf("%d Bytes = %.2f KiB = %.2f MiB\n", size, (double)size / 1.024e3, |
| 21 | (double)size / 1.048576e6); |
| 22 | } |
| 23 | |
| 24 | void genimg_print_time(time_t timestamp) |
| 25 | { |
| 26 | printf("%s", ctime(×tamp)); |
| 27 | } |