From 419f2c983bc269255b2a4ce279b253de1ff174b7 Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 25 Feb 2007 10:51:28 +0000 Subject: [PATCH] emulate access function, too. now even the device node /dev/windrvr6 is no longer needed --- usb-driver.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- 2.39.5