summaryrefslogtreecommitdiffstats
path: root/pciusb.c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-07-03 20:28:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-07-03 20:28:30 +0000
commitbe5157fb3c02a602e9299fdac562ede9c44d50ab (patch)
tree64986387ee5871f4ebcdef4a7e077117120607c8 /pciusb.c
parentabd3cd171111eb369972d8df5972b15cb145c107 (diff)
downloadldetect-be5157fb3c02a602e9299fdac562ede9c44d50ab.tar
ldetect-be5157fb3c02a602e9299fdac562ede9c44d50ab.tar.gz
ldetect-be5157fb3c02a602e9299fdac562ede9c44d50ab.tar.bz2
ldetect-be5157fb3c02a602e9299fdac562ede9c44d50ab.tar.xz
ldetect-be5157fb3c02a602e9299fdac562ede9c44d50ab.zip
fix pb when 2 similar cards are there
Diffstat (limited to 'pciusb.c')
-rw-r--r--pciusb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pciusb.c b/pciusb.c
index 37f3edb..d36ac30 100644
--- a/pciusb.c
+++ b/pciusb.c
@@ -1,5 +1,8 @@
+#define _GNU_SOURCE
+
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/wait.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
@@ -96,7 +99,7 @@ extern int pciusb_find_modules(struct pciusb_entries entries, const char *fpcius
}
if ((nb != 4 || (subvendor == e->subvendor && subdevice == e->subdevice)) && !e->module) {
- char *p = buf + offset + 1;
+ char *p = strdupa(buf + offset + 1);
char *q = strchr(p, '\t');
if (q) {
q[-1] = 0;