enhance fimgmetadata -h

This commit is contained in:
tTh 2023-09-11 11:09:31 +02:00
parent 2c14368cd5
commit 5d139312e2
1 changed files with 17 additions and 0 deletions

View File

@ -57,6 +57,22 @@ for (n=0, cmd=Cmd_list; cmd->name; cmd++, n++) {
return -1; /* NOT FOUND */
}
/* --------------------------------------------------------------------- */
void list_commands(void)
{
Cmd *cmd;
int n;
fputs("Commands:", stderr);
for (n=0, cmd=Cmd_list; cmd->name; cmd++) {
n += fprintf(stderr, " %s", cmd->name);
if (n > 40) {
fputs("\n ", stderr);
n = 0;
}
}
fputs("\n", stderr);
}
/* --------------------------------------------------------------------- */
int get_print_metadata(char *fname, char *command)
{
int foo, action;
@ -101,6 +117,7 @@ void help(void)
{
fprintf(stderr, "*** Fimg Metadata Reader (%s, %s)\n", __DATE__, __TIME__);
fimg_print_version(1);
list_commands();
exit(0);
}
/* --------------------------------------------------------------------- */