udi->Pipe0.dwNumber = 0x00;
udi->Pipe0.dwMaximumPacketSize = usbdevice->descriptor.bMaxPacketSize0;
udi->Pipe0.type = 0;
- udi->Pipe0.direction = 3;
+ udi->Pipe0.direction = WDU_DIR_IN_OUT;
udi->Pipe0.dwInterval = 0;
pConfigs = &(udi->pConfigs);
case VERSION:
version = (struct version_struct*)(wdheader->data);
strcpy(version->version, "WinDriver no more");
- version->versionul = 999;
+ version->versionul = 802;
#ifdef DEBUG
fprintf(stderr,"faking VERSION\n");
#endif
char *fgets(char *s, int size, FILE *stream) {
static char* (*func) (char*, int, FILE*) = NULL;
- const char modules[] = "windrvr6 160960 0 - Live 0xf98b0000\n";
+ const char modules[][256] = {"windrvr6 1 0 - Live 0xdeadbeef\n", "parport_pc 1 0 - Live 0xdeadbeef\n"};
char *ret = NULL;
func = (char* (*) (char*, int, FILE*)) dlsym(REAL_LIBC, "fgets");
if (modulesfp == stream) {
- if (!modules_read) {
- strcpy(s, modules);
+ if (modules_read < sizeof(modules)) {
+ strcpy(s, modules[modules_read]);
ret = s;
- modules_read = 1;
+ modules_read++;
}
} else {
ret = (*func)(s,size,stream);
return (*func)(fp);
}
+
+int access(const char *pathname, int mode) {
+ static int (*func) (const char*, int);
+
+ if (!func)
+ func = (int (*) (const char*, int)) dlsym(REAL_LIBC, "access");
+
+ if (!strcmp(pathname, "/dev/windrvr6")) {
+ return 0;
+ } else {
+ return (*func)(pathname, mode);
+ }
+}
#endif