projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the roboswitch code for the WRT350N
[openwrt.git]
/
package
/
switch
/
src
/
switch-core.c
diff --git
a/package/switch/src/switch-core.c
b/package/switch/src/switch-core.c
index
c1c9e58
..
e0aa541
100644
(file)
--- a/
package/switch/src/switch-core.c
+++ b/
package/switch/src/switch-core.c
@@
-100,6
+100,7
@@
static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff
len = 0;
}
len = 0;
}
+ kfree(page);
return len;
}
return len;
}
@@
-138,18
+139,18
@@
static ssize_t switch_proc_write(struct file *file, const char *buf, size_t coun
static int handle_driver_name(void *driver, char *buf, int nr)
{
static int handle_driver_name(void *driver, char *buf, int nr)
{
- char *name = ((switch_driver *) driver)->name;
+ c
onst c
har *name = ((switch_driver *) driver)->name;
return sprintf(buf, "%s\n", name);
}
static int handle_driver_version(void *driver, char *buf, int nr)
{
return sprintf(buf, "%s\n", name);
}
static int handle_driver_version(void *driver, char *buf, int nr)
{
- char *version = ((switch_driver *) driver)->version;
+ c
onst c
har *version = ((switch_driver *) driver)->version;
strcpy(buf, version);
return sprintf(buf, "%s\n", version);
}
strcpy(buf, version);
return sprintf(buf, "%s\n", version);
}
-static void add_handler(switch_driver *driver, switch_config *handler, struct proc_dir_entry *parent, int nr)
+static void add_handler(switch_driver *driver,
const
switch_config *handler, struct proc_dir_entry *parent, int nr)
{
switch_priv *priv = (switch_priv *) driver->data;
struct proc_dir_entry *p;
{
switch_priv *priv = (switch_priv *) driver->data;
struct proc_dir_entry *p;
@@
-174,7
+175,7
@@
static void add_handler(switch_driver *driver, switch_config *handler, struct pr
}
}
}
}
-static inline void add_handlers(switch_driver *driver, switch_config *handlers, struct proc_dir_entry *parent, int nr)
+static inline void add_handlers(switch_driver *driver,
const
switch_config *handlers, struct proc_dir_entry *parent, int nr)
{
int i;
{
int i;
@@
-407,7
+408,7
@@
int switch_register_driver(switch_driver *driver)
memcpy(new, driver, sizeof(switch_driver));
new->name = strdup(driver->name);
new->interface = strdup(driver->interface);
memcpy(new, driver, sizeof(switch_driver));
new->name = strdup(driver->name);
new->interface = strdup(driver->interface);
-
+
if ((ret = do_register(new)) < 0) {
kfree(new->name);
kfree(new);
if ((ret = do_register(new)) < 0) {
kfree(new->name);
kfree(new);
This page took
0.022945 seconds
and
4
git commands to generate.