3 weeks ago | Paul Boddie | raw files shortlog changelog graph | Added invocation help text when no arguments are provided. | libc_newlib tip |
test_files/programs/test_systemv.c (file) |
1.1 --- a/test_files/programs/test_systemv.c Sat May 11 23:53:52 2024 +0200 1.2 +++ b/test_files/programs/test_systemv.c Sun May 12 00:25:49 2024 +0200 1.3 @@ -34,6 +34,12 @@ 1.4 { 1.5 int result; 1.6 1.7 + if (argc < 2) 1.8 + { 1.9 + printf("Usage: test_systemv <program> <argument>...\n"); 1.10 + return 1; 1.11 + } 1.12 + 1.13 printf("Running: %s\n", argv[1]); 1.14 1.15 result = systemv(argc - 1, (const char **) argv + 1);