From: Martin Mares Date: Sat, 9 Sep 2006 10:54:10 +0000 (+0200) Subject: Whitespace cleanup of all source files. X-Git-Tag: v3.0.0~30 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=94db5c82212761573cc656df77c727001f554591;p=pciutils.git Whitespace cleanup of all source files. --- diff --git a/ChangeLog b/ChangeLog index bd403c7..37d10e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-09-09 Martin Mares + * Whitespace cleanup of all source files. + * The pci.ids file can be stored compressed if zlib is available. Added transparent decompression to lib/names.c, modified update-pciids.sh to keep the file compressed if applicable, updated Makefiles. @@ -1220,7 +1222,7 @@ Tue Jan 19 23:00:12 1999 Martin Mares * Started the "New Generation" branch and introduced the PCI library. - + * lspci: Rewritten to use the library. Tue Jan 19 22:24:08 1999 Martin Mares diff --git a/lib/aix-device.c b/lib/aix-device.c index 93a8e4e..2c6a2cc 100644 --- a/lib/aix-device.c +++ b/lib/aix-device.c @@ -236,7 +236,7 @@ aix_read(struct pci_dev *d, int pos, byte *buf, int len) if (ioctl(fd, MIOPCFGET, &mdio) < 0) d->access->error("aix_read: ioctl(MIOPCFGET) failed"); - + return 1; } diff --git a/lib/fbsd-device.c b/lib/fbsd-device.c index ba3337c..46fa7a2 100644 --- a/lib/fbsd-device.c +++ b/lib/fbsd-device.c @@ -90,10 +90,10 @@ fbsd_read(struct pci_dev *d, int pos, byte *buf, int len) pi.pi_reg = pos; pi.pi_width = len; - + if (ioctl(d->access->fd, PCIOCREAD, &pi) < 0) d->access->error("fbsd_read: ioctl(PCIOCREAD) failed"); - + switch (len) { case 1: @@ -128,7 +128,7 @@ fbsd_write(struct pci_dev *d, int pos, byte *buf, int len) pi.pi_reg = pos; pi.pi_width = len; - + switch (len) { case 1: @@ -141,7 +141,7 @@ fbsd_write(struct pci_dev *d, int pos, byte *buf, int len) pi.pi_data = ((u32 *) buf)[0]; break; } - + if (ioctl(d->access->fd, PCIOCWRITE, &pi) < 0) { d->access->error("fbsd_write: ioctl(PCIOCWRITE) failed"); diff --git a/lib/internal.h b/lib/internal.h index 117d7b2..925eac1 100644 --- a/lib/internal.h +++ b/lib/internal.h @@ -36,5 +36,5 @@ struct pci_dev *pci_alloc_dev(struct pci_access *); int pci_link_dev(struct pci_access *, struct pci_dev *); extern struct pci_methods pm_intel_conf1, pm_intel_conf2, pm_linux_proc, - pm_fbsd_device, pm_aix_device, pm_nbsd_libpci, pm_obsd_device, + pm_fbsd_device, pm_aix_device, pm_nbsd_libpci, pm_obsd_device, pm_dump, pm_linux_sysfs; diff --git a/lib/nbsd-libpci.c b/lib/nbsd-libpci.c index 00c6878..a79d878 100644 --- a/lib/nbsd-libpci.c +++ b/lib/nbsd-libpci.c @@ -78,7 +78,7 @@ nbsd_read(struct pci_dev *d, int pos, byte *buf, int len) shift = 8*(pos % 4); pos &= ~3; - + if (pcibus_conf_read(d->access->fd, d->bus, d->dev, d->func, pos, &val) < 0) d->access->error("nbsd_read: pci_bus_conf_read() failed"); @@ -135,7 +135,7 @@ nbsd_write(struct pci_dev *d, int pos, byte *buf, int len) val = le32_to_cpu(*(u32*)buf); break; } - + if (pcibus_conf_write(d->access->fd, d->bus, d->dev, d->func, pos, val) < 0) d->access->error("nbsd_write: pci_bus_conf_write() failed"); diff --git a/lib/obsd-device.c b/lib/obsd-device.c index e3e3630..c24f2e3 100644 --- a/lib/obsd-device.c +++ b/lib/obsd-device.c @@ -78,7 +78,7 @@ obsd_read(struct pci_dev *d, int pos, byte *buf, int len) pi.pi_reg = pos - (pos % 4); pi.pi_width = 4; - + if (ioctl(d->access->fd, PCIOCREAD, &pi) < 0) { if (errno == ENXIO) { pi.pi_data = 0xffffffff; @@ -122,7 +122,7 @@ obsd_write(struct pci_dev *d, int pos, byte *buf, int len) pi.pi_reg = pos; pi.pi_width = len; - + switch (len) { case 1: @@ -135,7 +135,7 @@ obsd_write(struct pci_dev *d, int pos, byte *buf, int len) pi.pi_data = ((u32 *) buf)[0]; break; } - + if (ioctl(d->access->fd, PCIOCWRITE, &pi) < 0) { d->access->error("obsd_write: ioctl(PCIOCWRITE) failed"); diff --git a/lspci.c b/lspci.c index 98c0bb3..a5eca91 100644 --- a/lspci.c +++ b/lspci.c @@ -500,13 +500,13 @@ show_pcix_nobridge(struct device *d, int where) static const byte max_outstanding[8] = { 1, 2, 3, 4, 8, 12, 16, 32 }; printf("PCI-X non-bridge device\n"); - + if (verbose < 2) return; if (!config_fetch(d, where + PCI_PCIX_STATUS, 4)) return; - + command = get_conf_word(d, where + PCI_PCIX_COMMAND); status = get_conf_long(d, where + PCI_PCIX_STATUS); printf("\t\tCommand: DPERE%c ERO%c RBC=%d OST=%d\n", @@ -537,15 +537,15 @@ show_pcix_bridge(struct device *d, int where) static const char * const sec_clock_freq[8] = { "conv", "66MHz", "100MHz", "133MHz", "?4", "?5", "?6", "?7" }; u16 secstatus; u32 status, upstcr, downstcr; - + printf("PCI-X bridge device\n"); - + if (verbose < 2) return; - + if (!config_fetch(d, where + PCI_PCIX_BRIDGE_STATUS, 12)) return; - + secstatus = get_conf_word(d, where + PCI_PCIX_BRIDGE_SEC_STATUS); printf("\t\tSecondary Status: 64bit%c 133MHz%c SCD%c USC%c SCO%c SRD%c Freq=%s\n", FLAG(secstatus, PCI_PCIX_BRIDGE_SEC_STATUS_64BIT), @@ -556,7 +556,7 @@ show_pcix_bridge(struct device *d, int where) FLAG(secstatus, PCI_PCIX_BRIDGE_SEC_STATUS_SPLIT_REQUEST_DELAYED), sec_clock_freq[(secstatus >> 6) & 7]); status = get_conf_long(d, where + PCI_PCIX_BRIDGE_STATUS); - printf("\t\tStatus: Dev=%02x:%02x.%d 64bit%c 133MHz%c SCD%c USC%c SCO%c SRD%c\n", + printf("\t\tStatus: Dev=%02x:%02x.%d 64bit%c 133MHz%c SCD%c USC%c SCO%c SRD%c\n", ((status >> 8) & 0xff), ((status >> 3) & 0x1f), (status & PCI_PCIX_BRIDGE_STATUS_FUNCTION), @@ -1088,9 +1088,9 @@ static void show_express_dev(struct device *d, int where, int type) w = get_conf_word(d, where + PCI_EXP_DEVCTL); printf("\t\tDevice: Errors: Correctable%c Non-Fatal%c Fatal%c Unsupported%c\n", - FLAG(w, PCI_EXP_DEVCTL_CERE), - FLAG(w, PCI_EXP_DEVCTL_NFERE), - FLAG(w, PCI_EXP_DEVCTL_FERE), + FLAG(w, PCI_EXP_DEVCTL_CERE), + FLAG(w, PCI_EXP_DEVCTL_NFERE), + FLAG(w, PCI_EXP_DEVCTL_FERE), FLAG(w, PCI_EXP_DEVCTL_URRE)); printf("\t\tDevice: RlxdOrd%c ExtTag%c PhantFunc%c AuxPwr%c NoSnoop%c\n", FLAG(w, PCI_EXP_DEVCTL_RELAXED), diff --git a/lspci.man b/lspci.man index 7f44fd1..ca662d0 100644 --- a/lspci.man +++ b/lspci.man @@ -117,7 +117,7 @@ the results are identical to normal listing modes, modulo bugs in lspci). Please that the bus mapper doesn't support PCI domains and scans only domain 0. .TP .B --version -Shows +Shows .I lspci version. This option should be used stand-alone. diff --git a/maint/release.pm b/maint/release.pm index 18bd271..dc937ce 100644 --- a/maint/release.pm +++ b/maint/release.pm @@ -147,7 +147,7 @@ sub CopyFile($$$$) { $empty && next; $empty = 1; } else { $empty = 0; } - } + } print O; } close O;