Send 'camcontrol help' usage output to stdout instead of stderr, so it

can be viewed more easily with a pager.

Regular (i.e. short) usage output is still sent to stderr.

PR:		bin/12358
Submitted by:	Christian Weisgerber <naddy@mips.rhein-neckar.de>
This commit is contained in:
Kenneth D. Merry 2000-06-03 22:07:56 +00:00
parent 93a3fa19b5
commit cee3fcd1a2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61228

View File

@ -2963,7 +2963,7 @@ scsiformat(struct cam_device *device, int argc, char **argv,
void
usage(int verbose)
{
fprintf(stderr,
fprintf(verbose ? stdout : stderr,
"usage: camcontrol <command> [device id][generic args][command args]\n"
" camcontrol devlist [-v]\n"
" camcontrol periphlist [dev_id][-n dev_name] [-u unit]\n"
@ -2989,7 +2989,7 @@ usage(int verbose)
" camcontrol help\n");
if (!verbose)
return;
fprintf(stderr,
fprintf(stdout,
"Specify one of the following options:\n"
"devlist list all CAM devices\n"
"periphlist list all CAM peripheral drivers attached to a device\n"