summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pciconf
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-10-06 11:38:30 +0000
committercharnier <charnier@FreeBSD.org>1997-10-06 11:38:30 +0000
commitede59acb9106d46a484a7a0badbbd93b32b13f6b (patch)
tree0dac60a5de272a4a12279c362ef2af12b181f56b /usr.sbin/pciconf
parente1eba2d48d55ccab7473f0ec67ac16b5daed99c7 (diff)
downloadFreeBSD-src-ede59acb9106d46a484a7a0badbbd93b32b13f6b.zip
FreeBSD-src-ede59acb9106d46a484a7a0badbbd93b32b13f6b.tar.gz
Sync usage string with man page.
Diffstat (limited to 'usr.sbin/pciconf')
-rw-r--r--usr.sbin/pciconf/pciconf.817
-rw-r--r--usr.sbin/pciconf/pciconf.c25
2 files changed, 25 insertions, 17 deletions
diff --git a/usr.sbin/pciconf/pciconf.8 b/usr.sbin/pciconf/pciconf.8
index 5ed79ea..a7d6ac4 100644
--- a/usr.sbin/pciconf/pciconf.8
+++ b/usr.sbin/pciconf/pciconf.8
@@ -1,4 +1,4 @@
-.\" $Id$
+.\" $Id: pciconf.8,v 1.2 1997/02/22 16:09:06 peter Exp $
.\" Copyright (c) 1997
.\" Stefan Esser <se@freebsd.org>. All rights reserved.
.\"
@@ -41,7 +41,7 @@
.Ar reg value
.Sh DESCRIPTION
The
-.Em pciconf
+.Nm
command provides a command line interface to the functionality provided by
.Pa /dev/pci Ns 's
.Xr ioctl 2
@@ -93,7 +93,7 @@ The
.Fl l
option is the only one available to non-root users.
All other invocations of
-.Nm pciconf
+.Nm
require a
.Ar selector
of the form
@@ -102,14 +102,14 @@ of the form
.Li \&: Ns Va function ) .
A final colon may be appended and
will be ignored; this is so that the first column in the output of
-.Nm pciconf
+.Nm
.Fl l
can be used without modification. All numbers are base 10.
.Pp
With the
.Fl a
flag,
-.Nm pciconf
+.Nm
determines whether any driver has been assigned to the device
identified by
.Ar selector .
@@ -147,7 +147,7 @@ write a longword (four bytes).
.Xr modload 8
.Sh HISTORY
The
-.Nm pciconf
+.Nm
command appeared first in
.Fx 2.2 .
The
@@ -159,7 +159,10 @@ LKM support in
.Sh AUTHORS
The
.Nm
-facility was written by Stefan Esser and Garrett Wollman.
+facility was written by
+.An Stefan Esser
+and
+.An Garrett Wollman .
.Sh BUGS
The
.Fl b
diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c
index 1663335..85a09e8 100644
--- a/usr.sbin/pciconf/pciconf.c
+++ b/usr.sbin/pciconf/pciconf.c
@@ -25,10 +25,13 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $ANA: pciconf.c,v 1.1.1.1 1996/09/25 21:12:57 wollman Exp $
*/
+#ifndef lint
+static const char rcsid[] =
+ "$Id$";
+#endif /* not lint */
+
#include <sys/types.h>
#include <sys/fcntl.h>
@@ -51,11 +54,13 @@ static void chkattached(const char *, int);
static exitstatus = 0;
static void
-usage(const char *argv0) {
- fprintf(stderr, "usage:\n\t%s -l\n"
- "\t%s -a sel\n"
- "\t%s [-r|-w] [-bh] sel addr [value]\n",
- argv0, argv0, argv0);
+usage()
+{
+ fprintf(stderr, "%s\n%s\n%s\n%s\n",
+ "usage: pciconf -l",
+ " pciconf -a sel",
+ " pciconf -r [-b | -h] sel addr",
+ " pciconf -w [-b | -h] sel addr [value]");
exit (1);
}
@@ -95,7 +100,7 @@ main(int argc, char **argv)
break;
default:
- usage(argv[0]);
+ usage();
}
}
@@ -103,7 +108,7 @@ main(int argc, char **argv)
|| (writemode && optind + 3 != argc)
|| (readmode && optind + 2 != argc)
|| (attachedmode && optind + 1 != argc))
- usage(argv[0]);
+ usage();
if (listmode) {
list_devs();
@@ -117,7 +122,7 @@ main(int argc, char **argv)
writeit(argv[optind], argv[optind + 1], argv[optind + 2],
byte ? 1 : isshort ? 2 : 4);
} else {
- usage(argv[0]);
+ usage();
}
return exitstatus;
OpenPOWER on IntegriCloud