diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-07-03 20:28:30 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-07-03 20:28:30 +0000 |
commit | be5157fb3c02a602e9299fdac562ede9c44d50ab (patch) | |
tree | 64986387ee5871f4ebcdef4a7e077117120607c8 /pciusb.c | |
parent | abd3cd171111eb369972d8df5972b15cb145c107 (diff) | |
download | ldetect-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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |