Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314301
b: refs/heads/master
c: d8cb548
h: refs/heads/master
i:
  314299: 96310ac
v: v3
  • Loading branch information
Marek Lindner authored and Antonio Quartulli committed Jun 18, 2012
1 parent 918c7e5 commit 43d1086
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 519d3497c667ed2f26f0b7ea56f1451e387264d7
refs/heads/master: d8cb548616524e10d36b4241b03893a11655ec5d
11 changes: 8 additions & 3 deletions trunk/net/batman-adv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,19 @@ int bat_algo_seq_print_text(struct seq_file *seq, void *offset)
static int param_set_ra(const char *val, const struct kernel_param *kp)
{
struct bat_algo_ops *bat_algo_ops;
char *algo_name = (char *)val;
size_t name_len = strlen(algo_name);

bat_algo_ops = bat_algo_get((char *)val);
if (algo_name[name_len - 1] == '\n')
algo_name[name_len - 1] = '\0';

bat_algo_ops = bat_algo_get(algo_name);
if (!bat_algo_ops) {
pr_err("Routing algorithm '%s' is not supported\n", val);
pr_err("Routing algorithm '%s' is not supported\n", algo_name);
return -EINVAL;
}

return param_set_copystring(val, kp);
return param_set_copystring(algo_name, kp);
}

static const struct kernel_param_ops param_ops_ra = {
Expand Down

0 comments on commit 43d1086

Please sign in to comment.