X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Ffile2include.c;h=b98af30a7281d675a58ba3ebb40f1ddf52f1ee54;hb=8da19df5b504f1cbe79e13f859bc229c042aded5;hp=7ca45c8339a252129aa538dabc65446ee4948708;hpb=83d290c56fab2d38cd1ab4c4cc7099559c1d5046;p=u-boot diff --git a/tools/file2include.c b/tools/file2include.c index 7ca45c8339..b98af30a72 100644 --- a/tools/file2include.c +++ b/tools/file2include.c @@ -62,12 +62,11 @@ int main(int argc, char *argv[]) count = fread(buf, 1, count, file); /* Generate output */ + printf("/* SPDX-License-Identifier: GPL-2.0+ */\n"); printf("/*\n"); printf(" * Non-zero %u byte strings of a disk image\n", BLOCK_SIZE); printf(" *\n"); printf(" * Generated with tools/file2include\n"); - printf(" *\n"); - printf(" * SPDX-License-Identifier: GPL-2.0+\n"); printf(" */\n\n"); printf("#define EFI_ST_DISK_IMG { 0x%08zx, { \\\n", count); @@ -85,7 +84,7 @@ int main(int argc, char *argv[]) printf("\\x%02x", buf[j]); printf("\"}, /* "); for (j = i; j < i + BLOCK_SIZE && j < count; ++j) { - if (buf[j] >= 0x20 && buf[j] <= 0x7e) + if (buf[j] != '*' && buf[j] >= 0x20 && buf[j] <= 0x7e) printf("%c", buf[j]); else printf(".");