File: proc_names_3_10_to_4_8.c

package info (click to toggle)
makedumpfile 1%3A1.7.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,172 kB
  • sloc: ansic: 24,015; perl: 149; makefile: 110; python: 18
file content (49 lines) | stat: -rw-r--r-- 665 bytes parent folder | download | duplicates (6)
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;
}