summaryrefslogtreecommitdiffstats
path: root/usb.c
diff options
context:
space:
mode:
authorChmouel Boudjnah <chmouel@mandriva.org>2001-04-05 00:12:43 +0000
committerChmouel Boudjnah <chmouel@mandriva.org>2001-04-05 00:12:43 +0000
commit7026c4726fc3f8d1cf7a2ee6a369e651c3de0974 (patch)
treee20bc5fcb505a7eb74ffb3a7bb5822afbddfddf8 /usb.c
parentc2f4fb923c2a55950ed273b7c0fbe2a460e211fc (diff)
downloadldetect-7026c4726fc3f8d1cf7a2ee6a369e651c3de0974.tar
ldetect-7026c4726fc3f8d1cf7a2ee6a369e651c3de0974.tar.gz
ldetect-7026c4726fc3f8d1cf7a2ee6a369e651c3de0974.tar.bz2
ldetect-7026c4726fc3f8d1cf7a2ee6a369e651c3de0974.tar.xz
ldetect-7026c4726fc3f8d1cf7a2ee6a369e651c3de0974.zip
Don't print ugly can't open.
Diffstat (limited to 'usb.c')
-rw-r--r--usb.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usb.c b/usb.c
index 4c6e8d0..d1fab02 100644
--- a/usb.c
+++ b/usb.c
@@ -18,11 +18,8 @@ extern struct pciusb_entries usb_probe(void) {
struct pciusb_entries r;
struct pciusb_entry *e = NULL;
- if (!(f = fopen(file, "r"))) {
- fprintf(stderr, "can't open %s\n", file);
- exit(1);
- }
-
+ if (!(f = fopen(file, "r"))) exit(1);
+
for(r.nb = line = 0; fgets(buf, sizeof(buf) - 1, f) && r.nb < psizeof(t); line++) {
if (buf[0] == 'P') {
e = &t[r.nb++];