mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 18:02:44 +00:00
Give usbdump a '-u' option for unbuffered output.
This commit is contained in:
parent
31eec6fe1a
commit
f50d2fced2
@ -37,6 +37,7 @@
|
||||
.Op Fl i Ar ifname
|
||||
.Op Fl r Ar file
|
||||
.Op Fl s Ar snaplen
|
||||
.Op Fl u
|
||||
.Op Fl v
|
||||
.Op Fl w Ar file
|
||||
.Op Fl f Ar filter
|
||||
@ -89,6 +90,8 @@ This option also works with the -f option.
|
||||
Snapshot
|
||||
.Ar snaplen
|
||||
bytes from each packet.
|
||||
.It Fl u
|
||||
Unbuffered output.
|
||||
.It Fl v
|
||||
Enable debugging messages.
|
||||
When defined multiple times the verbosity level increases.
|
||||
|
@ -829,7 +829,7 @@ main(int argc, char *argv[])
|
||||
const char *optstring;
|
||||
char *pp;
|
||||
|
||||
optstring = "b:d:hi:r:s:vw:f:";
|
||||
optstring = "b:d:hi:r:s:uvw:f:";
|
||||
while ((o = getopt(argc, argv, optstring)) != -1) {
|
||||
switch (o) {
|
||||
case 'b':
|
||||
@ -899,6 +899,10 @@ main(int argc, char *argv[])
|
||||
if (snapshot == 0)
|
||||
snapshot = -1;
|
||||
break;
|
||||
case 'u':
|
||||
setbuf(stdout, NULL);
|
||||
setbuf(stderr, NULL);
|
||||
break;
|
||||
case 'v':
|
||||
verbose++;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user