Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210536
b: refs/heads/master
c: aba9159
h: refs/heads/master
v: v3
  • Loading branch information
Masami Hiramatsu authored and Arnaldo Carvalho de Melo committed Sep 8, 2010
1 parent ab0c5c4 commit 7ba174c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 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: 367e94c10092469c896a226a77ef13cf6da757e4
refs/heads/master: aba91595cfcebd193425e20aabc407531526a1c5
17 changes: 10 additions & 7 deletions trunk/kernel/trace/trace_kprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,15 +997,18 @@ static int create_trace_probe(int argc, char **argv)

/* Parse argument name */
arg = strchr(argv[i], '=');
if (arg)
if (arg) {
*arg++ = '\0';
else
tp->args[i].name = kstrdup(argv[i], GFP_KERNEL);
} else {
arg = argv[i];
/* If argument name is omitted, set "argN" */
snprintf(buf, MAX_EVENT_NAME_LEN, "arg%d", i + 1);
tp->args[i].name = kstrdup(buf, GFP_KERNEL);
}

tp->args[i].name = kstrdup(argv[i], GFP_KERNEL);
if (!tp->args[i].name) {
pr_info("Failed to allocate argument%d name '%s'.\n",
i, argv[i]);
pr_info("Failed to allocate argument[%d] name.\n", i);
ret = -ENOMEM;
goto error;
}
Expand All @@ -1014,7 +1017,7 @@ static int create_trace_probe(int argc, char **argv)
*tmp = '_'; /* convert : to _ */

if (conflict_field_name(tp->args[i].name, tp->args, i)) {
pr_info("Argument%d name '%s' conflicts with "
pr_info("Argument[%d] name '%s' conflicts with "
"another field.\n", i, argv[i]);
ret = -EINVAL;
goto error;
Expand All @@ -1023,7 +1026,7 @@ static int create_trace_probe(int argc, char **argv)
/* Parse fetch argument */
ret = parse_probe_arg(arg, tp, &tp->args[i], is_return);
if (ret) {
pr_info("Parse error at argument%d. (%d)\n", i, ret);
pr_info("Parse error at argument[%d]. (%d)\n", i, ret);
goto error;
}
}
Expand Down

0 comments on commit 7ba174c

Please sign in to comment.