We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f1268ad + b593e3d commit ef35bf3Copy full SHA for ef35bf3
pvtoolsSrc/pvget.cpp
@@ -276,6 +276,12 @@ int MAIN (int argc, char *argv[])
276
277
// ================ Parse Arguments
278
279
+ if(argc <= optind){
280
+ /* No arguments specified */
281
+ fprintf(stderr, "No arguments specified. Please use " EXECNAME" -h for help");
282
+ return 1;
283
+ }
284
+
285
while ((opt = getopt(argc, argv, ":hvVRM:r:w:tmp:qdcF:f:ni")) != -1) {
286
switch (opt) {
287
case 'h': /* Print usage */
@@ -361,8 +367,11 @@ int MAIN (int argc, char *argv[])
361
367
optopt);
362
368
return 1;
363
369
default :
364
- usage();
365
- return 1;
370
+ fprintf(stderr,
371
+ "Option '-%c' is not supported - it is a valid option but is not implemented. \n",
372
+ optopt);
373
+ usage();
374
366
375
}
376
377
0 commit comments