update probe
[lttv.git] / tests / kernel / test-mark.c
CommitLineData
f8e77313 1/* test-mark.c
2 *
3 */
4
5#include <linux/marker.h>
6#include <linux/module.h>
7#include <linux/proc_fs.h>
8#include <linux/sched.h>
9
10int x=7;
11
12struct proc_dir_entry *pentry = NULL;
13
14static int my_open(struct inode *inode, struct file *file)
15{
16 MARK(subsys_mark1, "%d", 1);
17 MARK(subsys_mark2, "%d %s", 2, "blah2");
18 MARK(subsys_mark3, "%d %s", x, "blah3");
19
20 return -EPERM;
21}
22
23
24static struct file_operations my_operations = {
25 .open = my_open,
26};
27
28int init_module(void)
29{
30 pentry = create_proc_entry("testmark", 0444, NULL);
31 if(pentry)
32 pentry->proc_fops = &my_operations;
33 return 0;
34}
35
36void cleanup_module(void)
37{
38 remove_proc_entry("testmark", NULL);
39}
40
41MODULE_LICENSE("GPL");
42MODULE_AUTHOR("Mathieu Desnoyers");
43MODULE_DESCRIPTION("Marker Test");
44
This page took 0.024255 seconds and 4 git commands to generate.