| Summary: | Usage of ktrace(1) is invalid | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | takamune <takamune> | ||||
| Component: | bin | Assignee: | Mike Heffner <mikeh> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
State Changed From-To: open->closed State Changed From-To: closed->open Doh! Meant to take ownership, not close it. What's the correct way to abort a PR change? Responsible Changed From-To: freebsd-bugs-> mikeh I have a patch for this. Could someone take a quick look at the patch attached. It's to close pr bin/15456, but is slightly different than the patch in the pr. The main difference is the change pid->pidset. It appears this is a bug, because pid can be unitialized and testing against it isn't right. Thanks, Mike -- Mike Heffner <mheffner@vt.edu> Fredericksburg, VA <mikeh@FreeBSD.org> http://filebox.vt.edu/users/mheffner Index: ktrace.1 =================================================================== RCS file: /home/ncvs/src/usr.bin/ktrace/ktrace.1,v retrieving revision 1.9 diff -u -r1.9 ktrace.1 --- ktrace.1 2000/11/20 19:20:51 1.9 +++ ktrace.1 2001/06/16 06:16:50 @@ -42,8 +42,7 @@ .Nm .Op Fl aCcdi .Op Fl f Ar trfile -.Op Fl g Ar pgrp -.Op Fl p Ar pid +.Op Fl g Ar pgrp | Fl p Ar pid .Op Fl t Ar trstr .Nm .Op Fl adi Index: ktrace.c =================================================================== RCS file: /home/ncvs/src/usr.bin/ktrace/ktrace.c,v retrieving revision 1.14 diff -u -r1.14 ktrace.c --- ktrace.c 2000/09/04 06:09:46 1.14 +++ ktrace.c 2001/06/16 06:16:50 @@ -131,7 +131,7 @@ trpoints = ALL_POINTS; pid = 1; } else - ops |= pid ? KTROP_CLEAR : KTROP_CLEARFILE; + ops |= pidset ? KTROP_CLEAR : KTROP_CLEARFILE; if (ktrace(tracefile, ops, trpoints, pid) < 0) err(1, "%s", tracefile); @@ -186,8 +186,8 @@ usage() { (void)fprintf(stderr, "%s\n%s\n", -"usage: ktrace [-aCcid] [-f trfile] [-g pgid] [-p pid] [-t [cnisuv]", -" ktrace [-aCcid] [-f trfile] [-t [cnisuw] command"); +"usage: ktrace [-aCcdi] [-f trfile] [-g pgrp | -p pid] [-t cnisuw]", +" ktrace [-adi] [-f trfile] [-t cnisuw] command"); exit(1); } State Changed From-To: open->analyzed Fix has been committed to current. Will MFC in two weeks. State Changed From-To: analyzed->closed Fix MFC'd. |
Usage of ktrace(1) is not equivalent to its manual page. How-To-Repeat: % ktrace usage: ktrace [-aCcid] [-f trfile] [-g pgid] [-p pid] [-t [cnisuv] ktrace [-aCcid] [-f trfile] [-t [cnisuw] command % man 1 ktrace SYNOPSIS ktrace [-aCcdi] [-f trfile] [-g pgrp] [-p pid] [-t trstr] ktrace [-adi] [-f trfile] [-t trstr] command