From 8765a9ba170e94163964c881824fc289245113f3 Mon Sep 17 00:00:00 2001 From: logicog Date: Wed, 3 Sep 2025 20:32:04 +0200 Subject: [PATCH] Fix int arguments for file-size and location of added data --- tools/fileadder.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/fileadder.c b/tools/fileadder.c index af684d9..11bf793 100644 --- a/tools/fileadder.c +++ b/tools/fileadder.c @@ -39,10 +39,10 @@ const char *argp_program_bug_address = ""; static char doc[] = "Adds a file or a directory of files into an image"; static char args_doc[] = "addfile [options] INPUT_IMAGE"; static struct argp_option options[] = { - { "size", 's', "SIZE", OPTION_ARG_OPTIONAL, "Resize image"}, + { "size", 's', "SIZE", 0, "Resize image"}, { "output", 'o', "FILE", 0, "Output image file name instead of overwriting input image"}, { "data", 'd', "FILE", 0, "File or directory to add to image"}, - { "address", 'a', 0, OPTION_ARG_OPTIONAL, "Address where data is placed, default is 0x1000000 if option is used, otherwise 0x1fd000"}, + { "address", 'a', "SIZE", 0, "Address where data is placed, default is 0x1000000 if option is used, otherwise 0x1fd000"}, { "prefix", 'p', "FILE", 0, "Prefix for header and index file generation"}, { "bank", 'b', "BANKNAME", 0, "Generate #pragma with given bank-name"}, { 0 } @@ -57,6 +57,7 @@ struct arguments { char *bank; bool overwrite; bool add_zero; + char *args[1]; };