diff options
| author | Tom Rini <trini@konsulko.com> | 2020-10-22 14:36:47 -0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2020-10-22 14:36:47 -0400 |
| commit | ae4fdd7b0432bcb0bc2fe7d90b6d3e92001ab478 (patch) | |
| tree | e933e67609989d0e4960f1464384e9ff40732b30 /tools | |
| parent | b90daf2743b38022bea8727ede867ad63e971db2 (diff) | |
| parent | dddfde5401ed5ad82c996b35b61dc4a45bb4e2b3 (diff) | |
Merge branch '2020-10-22-misc-changes'
- Assorted updates for Xen, IPQ40xx, ASpeed, Keymile
- Assorted typo / documentation fixes
- Fix default preboot cmd to act like before with USB_STORAGE set
- A number of other bugfixes throughout the code
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/image-host.c | 8 | ||||
| -rw-r--r-- | tools/mkimage.c | 9 |
2 files changed, 11 insertions, 6 deletions
diff --git a/tools/image-host.c b/tools/image-host.c index 8886beff17..7cef78eab8 100644 --- a/tools/image-host.c +++ b/tools/image-host.c @@ -293,8 +293,8 @@ static int fit_image_read_data(char *filename, unsigned char *data, /* Check file size */ if (sbuf.st_size != expected_size) { - printf("File %s don't have the expected size (size=%ld, expected=%d)\n", - filename, sbuf.st_size, expected_size); + printf("File %s don't have the expected size (size=%lld, expected=%d)\n", + filename, (long long)sbuf.st_size, expected_size); goto err; } @@ -308,8 +308,8 @@ static int fit_image_read_data(char *filename, unsigned char *data, /* Check that we have read all the file */ if (n != sbuf.st_size) { - printf("Can't read all file %s (read %zd bytes, expexted %ld)\n", - filename, n, sbuf.st_size); + printf("Can't read all file %s (read %zd bytes, expexted %lld)\n", + filename, n, (long long)sbuf.st_size); goto err; } diff --git a/tools/mkimage.c b/tools/mkimage.c index 43078d075c..e78608293e 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -51,8 +51,13 @@ static int show_valid_options(enum ih_category category) return -ENOMEM; /* Sort the names in order of short name for easier reading */ - for (item = 0; item < count; item++) - order[item] = item; + for (i = 0, item = 0; i < count; i++, item++) { + while (!genimg_cat_has_id(category, item) && i < count) { + item++; + count--; + } + order[i] = item; + } cur_category = category; qsort(order, count, sizeof(int), h_compare_category_name); |
