Commits

Bryan O'Sullivan committed f38be18

A bit more useful output.

Comments (0)

Files changed (1)

 
 
 static void
-usage(int exitcode)
+usage(char *progname, int exitcode)
 {
-    fprintf(stderr, "Usage: netplug [-FPcip]\n");
+    fprintf(stderr, "Usage: %s [-FPcip]\n", progname);
 
     fprintf(stderr, "\t-F\t\t"
 	    "run in foreground (don't become a daemon)\n");
 	    cfg_read = 1;
 	    break;
 	case 'h':
-	    usage(0);
+	    usage(argv[0], 0);
 	    break;
 	case 'i':
 	    if (save_pattern(optarg) == -1) {
 	    pid_file = optarg;
 	    break;
 	case '?':
-	    usage(1);
+	    usage(argv[0], 1);
 	}
     }
     
     }
     
     if (getuid() != 0) {
-	do_log(LOG_WARNING, "This command will not work properly unless "
+	do_log(LOG_WARNING, "This daemon will not work properly unless "
 	       "run by root");
     }