From: michael <michael>
Date: Sun, 25 Feb 2007 10:51:28 +0000 (+0000)
Subject: emulate access function, too. now even the device node /dev/windrvr6 is
X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/commitdiff_plain/419f2c983bc269255b2a4ce279b253de1ff174b7

emulate access function, too. now even the device node /dev/windrvr6 is
no longer needed
---

diff --git a/usb-driver.c b/usb-driver.c
index 75a1bc5..692208e 100644
--- a/usb-driver.c
+++ b/usb-driver.c
@@ -719,4 +719,17 @@ int fclose(FILE *fp) {
 	
 	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