ref: 78758aa22afd4f923b8641acff0e4cb19b2820a2
parent: d52d4aa3ed87c0b94a953a3b65246a6774c80ae7
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Tue Dec 31 23:24:51 EST 2019
use argv0
--- a/fs.c
+++ b/fs.c
@@ -273,9 +273,9 @@
};
static void
-usage(char *prog)
+usage(void)
{
- print("usage: %s [-s srv] [-m mtpt] [-r rate]\n", prog);
+ print("usage: %s [-s srv] [-m mtpt] [-r rate]\n", argv0);
exits("usage");
}
@@ -292,16 +292,16 @@
chatty9p++;
break;
case 's':
- srv = EARGF(usage(argv[0]));
+ srv = EARGF(usage());
break;
case 'm':
- mtpt = EARGF(usage(argv[0]));
+ mtpt = EARGF(usage());
break;
case 'r':
- rate = atoi(EARGF(usage(argv[0])));
+ rate = atoi(EARGF(usage()));
break;
default:
- usage(argv[0]);
+ usage();
}ARGEND
if (srv == nil && mtpt == nil)