mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
Remove dead code (comma is either 0 or 1 for sure, no need to test).
Close /dev/pci when we're done with it. CID: 1007450, 1007449, 1008615, 1008614
This commit is contained in:
parent
65273b4808
commit
e96d5d7bb3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327581
|
@ -161,7 +161,7 @@ cap_pcix(int fd, struct pci_conf *p, uint8_t ptr)
|
||||||
printf("supports");
|
printf("supports");
|
||||||
comma = 0;
|
comma = 0;
|
||||||
if (status & PCIXM_STATUS_133CAP) {
|
if (status & PCIXM_STATUS_133CAP) {
|
||||||
printf("%s 133MHz", comma ? "," : "");
|
printf(" 133MHz");
|
||||||
comma = 1;
|
comma = 1;
|
||||||
}
|
}
|
||||||
if (status & PCIXM_STATUS_266CAP) {
|
if (status & PCIXM_STATUS_266CAP) {
|
||||||
|
@ -351,10 +351,8 @@ cap_vendor(int fd, struct pci_conf *p, uint8_t ptr)
|
||||||
printf("%s SATA RAID-0/1/10", comma ? "," : "");
|
printf("%s SATA RAID-0/1/10", comma ? "," : "");
|
||||||
comma = 1;
|
comma = 1;
|
||||||
}
|
}
|
||||||
if (fvec & (1 << 3)) {
|
if (fvec & (1 << 3))
|
||||||
printf("%s SATA AHCI", comma ? "," : "");
|
printf(", SATA AHCI");
|
||||||
comma = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1005,6 +1005,7 @@ writeit(const char *name, const char *reg, const char *data, int width)
|
||||||
|
|
||||||
if (ioctl(fd, PCIOCWRITE, &pi) < 0)
|
if (ioctl(fd, PCIOCWRITE, &pi) < 0)
|
||||||
err(1, "ioctl(PCIOCWRITE)");
|
err(1, "ioctl(PCIOCWRITE)");
|
||||||
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1024,4 +1025,5 @@ chkattached(const char *name)
|
||||||
|
|
||||||
exitstatus = pi.pi_data ? 0 : 2; /* exit(2), if NOT attached */
|
exitstatus = pi.pi_data ? 0 : 2; /* exit(2), if NOT attached */
|
||||||
printf("%s: %s%s\n", name, pi.pi_data == 0 ? "not " : "", "attached");
|
printf("%s: %s%s\n", name, pi.pi_data == 0 ? "not " : "", "attached");
|
||||||
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue