mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-15 22:41:23 +00:00
pmcstat: fix the usage message for -t
A slight mix-up of the flags means this case isn't triggered when it
should be. Now, `pmcstat -s event -t 1234` will print the correct
error message.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
(cherry picked from commit c4473add1d
)
This commit is contained in:
parent
112e303018
commit
d87ee7b97f
|
@ -898,7 +898,8 @@ main(int argc, char **argv)
|
|||
pmcstat_show_usage();
|
||||
|
||||
/* check for -t pid without a process PMC spec */
|
||||
if ((args.pa_required & FLAG_HAS_TARGET) &&
|
||||
if ((args.pa_flags & FLAG_HAS_TARGET) &&
|
||||
(args.pa_required & FLAG_HAS_PROCESS_PMCS) &&
|
||||
(args.pa_flags & FLAG_HAS_PROCESS_PMCS) == 0)
|
||||
errx(EX_USAGE,
|
||||
"ERROR: option -t requires a process mode PMC to be specified."
|
||||
|
|
Loading…
Reference in a new issue