X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cmd%2Fximg.c;h=32bfae8b22be6c1c5ee1c1d7d837c10c091280d8;hb=2950c514e8fc2c9d6a48cd7187521bc648dc679e;hp=069c6ad39abed4bff19b804a03667ff7d14fe69b;hpb=ebca902aeb3af3eaedd2787928184ad84a86b98f;p=oweals%2Fu-boot.git diff --git a/cmd/ximg.c b/cmd/ximg.c index 069c6ad39a..32bfae8b22 100644 --- a/cmd/ximg.c +++ b/cmd/ximg.c @@ -1,11 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2000-2004 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * (C) Copyright 2003 * Kai-Uwe Bloem, Auerswald GmbH & Co KG, - * - * SPDX-License-Identifier: GPL-2.0+ */ @@ -144,7 +143,7 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) return 1; } - if (fit_image_check_comp(fit_hdr, noffset, IH_COMP_NONE) + if (!fit_image_check_comp(fit_hdr, noffset, IH_COMP_NONE) && (argc < 4)) { printf("Must specify load address for %s command " "with compressed image\n", @@ -160,9 +159,9 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) } } - /* get subimage data address and length */ - if (fit_image_get_data(fit_hdr, noffset, - &fit_data, &fit_len)) { + /* get subimage/external data address and length */ + if (fit_image_get_data_and_size(fit_hdr, noffset, + &fit_data, &fit_len)) { puts("Could not find script subimage data\n"); return 1; }