diff options
author | David Howells <dhowells@redhat.com> | 2006-09-27 04:50:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-27 11:26:14 -0400 |
commit | dbf8685c8e21404e3a8ed244bd0219d3c4b89101 (patch) | |
tree | 716b83de856049b51abf9770840ea122b7ca3285 /fs/proc/nommu.c | |
parent | d00c7b993712e4bb16d0012b35b654e40159b327 (diff) |
[PATCH] NOMMU: Implement /proc/pid/maps for NOMMU
Implement /proc/pid/maps for NOMMU by reading the vm_area_list attached to
current->mm->context.vmlist.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/proc/nommu.c')
-rw-r--r-- | fs/proc/nommu.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c index cff10ab1af63..d7dbdf9e0f49 100644 --- a/fs/proc/nommu.c +++ b/fs/proc/nommu.c | |||
@@ -33,19 +33,15 @@ | |||
33 | #include "internal.h" | 33 | #include "internal.h" |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * display a list of all the VMAs the kernel knows about | 36 | * display a single VMA to a sequenced file |
37 | * - nommu kernals have a single flat list | ||
38 | */ | 37 | */ |
39 | static int nommu_vma_list_show(struct seq_file *m, void *v) | 38 | int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma) |
40 | { | 39 | { |
41 | struct vm_area_struct *vma; | ||
42 | unsigned long ino = 0; | 40 | unsigned long ino = 0; |
43 | struct file *file; | 41 | struct file *file; |
44 | dev_t dev = 0; | 42 | dev_t dev = 0; |
45 | int flags, len; | 43 | int flags, len; |
46 | 44 | ||
47 | vma = rb_entry((struct rb_node *) v, struct vm_area_struct, vm_rb); | ||
48 | |||
49 | flags = vma->vm_flags; | 45 | flags = vma->vm_flags; |
50 | file = vma->vm_file; | 46 | file = vma->vm_file; |
51 | 47 | ||
@@ -78,6 +74,18 @@ static int nommu_vma_list_show(struct seq_file *m, void *v) | |||
78 | return 0; | 74 | return 0; |
79 | } | 75 | } |
80 | 76 | ||
77 | /* | ||
78 | * display a list of all the VMAs the kernel knows about | ||
79 | * - nommu kernals have a single flat list | ||
80 | */ | ||
81 | static int nommu_vma_list_show(struct seq_file *m, void *v) | ||
82 | { | ||
83 | struct vm_area_struct *vma; | ||
84 | |||
85 | vma = rb_entry((struct rb_node *) v, struct vm_area_struct, vm_rb); | ||
86 | return nommu_vma_show(m, vma); | ||
87 | } | ||
88 | |||
81 | static void *nommu_vma_list_start(struct seq_file *m, loff_t *_pos) | 89 | static void *nommu_vma_list_start(struct seq_file *m, loff_t *_pos) |
82 | { | 90 | { |
83 | struct rb_node *_rb; | 91 | struct rb_node *_rb; |