mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 18:56:38 +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");
|
||||
comma = 0;
|
||||
if (status & PCIXM_STATUS_133CAP) {
|
||||
printf("%s 133MHz", comma ? "," : "");
|
||||
printf(" 133MHz");
|
||||
comma = 1;
|
||||
}
|
||||
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 ? "," : "");
|
||||
comma = 1;
|
||||
}
|
||||
if (fvec & (1 << 3)) {
|
||||
printf("%s SATA AHCI", comma ? "," : "");
|
||||
comma = 1;
|
||||
}
|
||||
if (fvec & (1 << 3))
|
||||
printf(", SATA AHCI");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1005,6 +1005,7 @@ writeit(const char *name, const char *reg, const char *data, int width)
|
|||
|
||||
if (ioctl(fd, PCIOCWRITE, &pi) < 0)
|
||||
err(1, "ioctl(PCIOCWRITE)");
|
||||
close(fd);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1024,4 +1025,5 @@ chkattached(const char *name)
|
|||
|
||||
exitstatus = pi.pi_data ? 0 : 2; /* exit(2), if NOT attached */
|
||||
printf("%s: %s%s\n", name, pi.pi_data == 0 ? "not " : "", "attached");
|
||||
close(fd);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue