1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-01 01:16:15 +02:00
openwrt-xburst/package/pcmcia-cs/patches/003-cardmgr_c.patch
nbd b5cb1795de refresh all package patches in the buildroot using quilt
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7490 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-06-04 11:25:53 +00:00

44 lines
1.2 KiB
Diff

Index: pcmcia-cs-3.2.8/cardmgr/cardmgr.c
===================================================================
--- pcmcia-cs-3.2.8.orig/cardmgr/cardmgr.c 2007-06-04 13:23:59.491689784 +0200
+++ pcmcia-cs-3.2.8/cardmgr/cardmgr.c 2007-06-04 13:24:00.561527144 +0200
@@ -739,10 +739,7 @@
int ret;
strcpy(cmd, "insmod ");
- if (strchr(mod, '/') != NULL)
- sprintf(cmd+7, "%s/%s.o", modpath, mod);
- else
- sprintf(cmd+7, "%s/pcmcia/%s.o", modpath, mod);
+ sprintf(cmd+7, "%s/%s.o", modpath, mod);
if (access(cmd+7, R_OK) != 0) {
syslog(LOG_NOTICE, "module %s not available", cmd+7);
free(cmd);
@@ -808,11 +805,13 @@
}
if (do_modprobe) {
- if (try_modprobe(mod, opts) != 0)
+ if (try_modprobe(mod, opts) != 0) {
try_insmod(mod, opts);
+ }
} else {
- if (try_insmod(mod, opts) != 0)
+ if (try_insmod(mod, opts) != 0) {
try_modprobe(mod, opts);
+ }
}
}
@@ -1113,8 +1112,9 @@
/* remove kernel modules in inverse order */
for (i = 0; i < card->bindings; i++) {
- for (j = dev[i]->modules-1; j >= 0; j--)
+ for (j = dev[i]->modules-1; j >= 0; j--) {
remove_module(dev[i]->module[j]);
+ }
free_device(dev[i]);
}
/* Remove any MTD's bound to this socket */