diff options
author | Chmouel Boudjnah <chmouel@mandriva.org> | 2001-04-05 00:12:43 +0000 |
---|---|---|
committer | Chmouel Boudjnah <chmouel@mandriva.org> | 2001-04-05 00:12:43 +0000 |
commit | 7026c4726fc3f8d1cf7a2ee6a369e651c3de0974 (patch) | |
tree | e20bc5fcb505a7eb74ffb3a7bb5822afbddfddf8 /usb.c | |
parent | c2f4fb923c2a55950ed273b7c0fbe2a460e211fc (diff) | |
download | ldetect-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.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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++]; |