diff options
author | Stefan Eßer <se@FreeBSD.org> | 1996-11-16 22:05:52 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 1996-11-16 22:05:52 +0000 |
commit | b1427fd41253586442723185d1763625c2d51697 (patch) | |
tree | ac633c46f5765c77fab53e393b5b6869b912bd4f /usr.sbin | |
parent | e534982b63ea9123c19d76df0a8cd2759f31ff07 (diff) | |
download | src-b1427fd41253586442723185d1763625c2d51697.tar.gz src-b1427fd41253586442723185d1763625c2d51697.zip |
Fix core dump after printing usage message (pointed out by BDE).
Add printing of PCI header type register. (This makes the output
80 columns wide. Ughh. I'm looking for a better way to put the
information on one line ...)
Notes
Notes:
svn path=/head/; revision=19817
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pciconf/pciconf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c index 2b2684238c6d..d16d88e0d380 100644 --- a/usr.sbin/pciconf/pciconf.c +++ b/usr.sbin/pciconf/pciconf.c @@ -53,6 +53,7 @@ usage(const char *argv0) { fprintf(stderr, "usage:\n\t%s -l\n" "\t%s [-r|-w] [-bh] sel addr [value]\n", argv0, argv0); + exit (1); } int @@ -131,10 +132,10 @@ list_devs(void) close(fd); for (p = conf; p < &conf[pc.pci_len / sizeof conf[0]]; p++) { - printf("pci%d:%d:%d:\tclass=0x%06x card=0x%08lx chip=0x%08lx rev=0x%02x\n", + printf("pci%d:%d:%d:\tclass=0x%06x card=0x%08lx chip=0x%08lx rev=0x%02x hdr=0x%02x\n", p->pc_sel.pc_bus, p->pc_sel.pc_dev, p->pc_sel.pc_func, p->pc_class >> 8, p->pc_subid, - p->pc_devid, p->pc_class & 0xff); + p->pc_devid, p->pc_class & 0xff, p->pc_hdr); } } |