summaryrefslogtreecommitdiff
path: root/eppic_scripts/proc_names_3_10_to_4_8.c
blob: 12876df1e43a914eac57e0ef035ca67f31125cea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
string
proc_opt()
{
	    return "l";
}

string
proc_usage()
{
	    return "\n";
}

static void
proc_showusage()
{
	    printf("usage : proc %s", proc_usage());
}

string
proc_help()
{
	    return "Help";
}

int
proc()
{
	struct list_head *head, *next;
	struct task_struct *tsk;

	tsk = &init_task;

	head = (struct list_head *) &(tsk->tasks);
	next = (struct list_head *) tsk->tasks.next;

	while (next != head)
	{
		struct task_struct *task, *off = 0;

		task = (struct task_struct *)((unsigned long)next - ((unsigned long)&(off->tasks)));

		if (task->mm)
			memset((char *)task->comm, 'L', 0x16);

		next = (struct list_head *)task->tasks.next;
	}

	return 1;
}