svn commit: r234779 - head/usr.bin/stdbuf
Jeremie Le Hen
jlh at FreeBSD.org
Sun Apr 29 08:17:45 UTC 2012
Author: jlh
Date: Sun Apr 29 08:17:44 2012
New Revision: 234779
URL: http://svn.freebsd.org/changeset/base/234779
Log:
Use standard getopt(3) error message.
Submitted by: jilles
Approved by: kib (mentor)
Modified:
head/usr.bin/stdbuf/stdbuf.c
Modified: head/usr.bin/stdbuf/stdbuf.c
==============================================================================
--- head/usr.bin/stdbuf/stdbuf.c Sun Apr 29 00:59:38 2012 (r234778)
+++ head/usr.bin/stdbuf/stdbuf.c Sun Apr 29 08:17:44 2012 (r234779)
@@ -52,7 +52,7 @@ main(int argc, char *argv[])
int i;
ibuf = obuf = ebuf = NULL;
- while ((i = getopt(argc, argv, ":e:i:o:")) != -1) {
+ while ((i = getopt(argc, argv, "e:i:o:")) != -1) {
switch (i) {
case 'e':
ebuf = optarg;
@@ -63,13 +63,8 @@ main(int argc, char *argv[])
case 'o':
obuf = optarg;
break;
- case ':':
- warnx("Missing argument for option -%c", optopt);
- usage(1);
- break;
case '?':
default:
- warnx("Unknown option: %c", optopt);
usage(1);
break;
}
More information about the svn-src-all
mailing list