utilbox: report unsupported commands

This commit is contained in:
Pierre Pronchery 2025-01-26 01:33:27 +01:00
parent ba0f73b07d
commit 699c247eb5

View File

@ -100,5 +100,6 @@ int main(int argc, char * argv[])
for(i = 0; calls[i].name != NULL; i++) for(i = 0; calls[i].name != NULL; i++)
if(strcmp(calls[i].name, argv[optind]) == 0) if(strcmp(calls[i].name, argv[optind]) == 0)
return calls[i].call(argc - optind, &argv[optind]); return calls[i].call(argc - optind, &argv[optind]);
return 0; fprintf(stderr, "%s: %s: command not found\n", PROGNAME, argv[optind]);
return 127;
} }