Skip to content

Commit

Permalink
Linux Kernel Markers: fix samples to follow format string standard
Browse files Browse the repository at this point in the history
Add the field names to marker example format string.

Signed-off-by: Mathieu Desnoyers <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Mathieu Desnoyers authored and Linus Torvalds committed Nov 15, 2007
1 parent 5f9468c commit cc9f2f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion samples/markers/marker-example.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ static int my_open(struct inode *inode, struct file *file)
{
int i;

trace_mark(subsystem_event, "%d %s", 123, "example string");
trace_mark(subsystem_event, "integer %d string %s", 123,
"example string");
for (i = 0; i < 10; i++)
trace_mark(subsystem_eventb, MARK_NOARGS);
return -EPERM;
Expand Down
2 changes: 1 addition & 1 deletion samples/markers/probe-example.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void probe_subsystem_eventb(const struct marker *mdata, void *private,
static struct probe_data probe_array[] =
{
{ .name = "subsystem_event",
.format = "%d %s",
.format = "integer %d string %s",
.probe_func = probe_subsystem_event },
{ .name = "subsystem_eventb",
.format = MARK_NOARGS,
Expand Down

0 comments on commit cc9f2f8

Please sign in to comment.