summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pciconf
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2008-09-03 07:08:22 +0000
committerimp <imp@FreeBSD.org>2008-09-03 07:08:22 +0000
commit88c5e9e192dc799e18634d995e809f49fcd1e4eb (patch)
treeaf9a74f95b59471e213303a739da54f303d6910f /usr.sbin/pciconf
parentcfa9a2ed0ebd90f5e4a9d4198e7031a4b4e7f705 (diff)
downloadFreeBSD-src-88c5e9e192dc799e18634d995e809f49fcd1e4eb.zip
FreeBSD-src-88c5e9e192dc799e18634d995e809f49fcd1e4eb.tar.gz
style nit: indent continuation lines correctly, use style(9) style
if() statement.
Diffstat (limited to 'usr.sbin/pciconf')
-rw-r--r--usr.sbin/pciconf/pciconf.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c
index 99135f4..9e7397f 100644
--- a/usr.sbin/pciconf/pciconf.c
+++ b/usr.sbin/pciconf/pciconf.c
@@ -146,13 +146,13 @@ main(int argc, char **argv)
list_devs(verbose, caps);
} else if (attachedmode) {
chkattached(argv[optind],
- byte ? 1 : isshort ? 2 : 4);
+ byte ? 1 : isshort ? 2 : 4);
} else if (readmode) {
readit(argv[optind], argv[optind + 1],
- byte ? 1 : isshort ? 2 : 4);
+ byte ? 1 : isshort ? 2 : 4);
} else if (writemode) {
writeit(argv[optind], argv[optind + 1], argv[optind + 2],
- byte ? 1 : isshort ? 2 : 4);
+ byte ? 1 : isshort ? 2 : 4);
} else {
usage();
}
@@ -204,17 +204,17 @@ list_devs(int verbose, int caps)
}
for (p = conf; p < &conf[pc.num_matches]; p++) {
printf("%s%d@pci%d:%d:%d:%d:\tclass=0x%06x card=0x%08x "
- "chip=0x%08x rev=0x%02x hdr=0x%02x\n",
- (p->pd_name && *p->pd_name) ? p->pd_name :
- "none",
- (p->pd_name && *p->pd_name) ? (int)p->pd_unit :
- none_count++, p->pc_sel.pc_domain,
- p->pc_sel.pc_bus, p->pc_sel.pc_dev,
- p->pc_sel.pc_func, (p->pc_class << 16) |
- (p->pc_subclass << 8) | p->pc_progif,
- (p->pc_subdevice << 16) | p->pc_subvendor,
- (p->pc_device << 16) | p->pc_vendor,
- p->pc_revid, p->pc_hdr);
+ "chip=0x%08x rev=0x%02x hdr=0x%02x\n",
+ (p->pd_name && *p->pd_name) ? p->pd_name :
+ "none",
+ (p->pd_name && *p->pd_name) ? (int)p->pd_unit :
+ none_count++, p->pc_sel.pc_domain,
+ p->pc_sel.pc_bus, p->pc_sel.pc_dev,
+ p->pc_sel.pc_func, (p->pc_class << 16) |
+ (p->pc_subclass << 8) | p->pc_progif,
+ (p->pc_subdevice << 16) | p->pc_subvendor,
+ (p->pc_device << 16) | p->pc_vendor,
+ p->pc_revid, p->pc_hdr);
if (verbose)
list_verbose(p);
if (caps)
@@ -549,7 +549,8 @@ readit(const char *name, const char *reg, int width)
sel = getsel(name);
for (i = 1, r = rstart; r <= rend; i++, r += width) {
readone(fd, &sel, r, width);
- if (i && !(i % 8)) putchar(' ');
+ if (i && !(i % 8))
+ putchar(' ');
putchar(i % (16/width) ? ' ' : '\n');
}
if (i % (16/width) != 1)
OpenPOWER on IntegriCloud