diff options
Diffstat (limited to 'fs/proc/nommu.c')
-rw-r--r-- | fs/proc/nommu.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c index ccfd99bd1c5a..5f9bc8a746c9 100644 --- a/fs/proc/nommu.c +++ b/fs/proc/nommu.c | |||
@@ -39,7 +39,7 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region) | |||
39 | unsigned long ino = 0; | 39 | unsigned long ino = 0; |
40 | struct file *file; | 40 | struct file *file; |
41 | dev_t dev = 0; | 41 | dev_t dev = 0; |
42 | int flags, len; | 42 | int flags; |
43 | 43 | ||
44 | flags = region->vm_flags; | 44 | flags = region->vm_flags; |
45 | file = region->vm_file; | 45 | file = region->vm_file; |
@@ -50,8 +50,9 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region) | |||
50 | ino = inode->i_ino; | 50 | ino = inode->i_ino; |
51 | } | 51 | } |
52 | 52 | ||
53 | seq_setwidth(m, 25 + sizeof(void *) * 6 - 1); | ||
53 | seq_printf(m, | 54 | seq_printf(m, |
54 | "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n", | 55 | "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu ", |
55 | region->vm_start, | 56 | region->vm_start, |
56 | region->vm_end, | 57 | region->vm_end, |
57 | flags & VM_READ ? 'r' : '-', | 58 | flags & VM_READ ? 'r' : '-', |
@@ -59,13 +60,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region) | |||
59 | flags & VM_EXEC ? 'x' : '-', | 60 | flags & VM_EXEC ? 'x' : '-', |
60 | flags & VM_MAYSHARE ? flags & VM_SHARED ? 'S' : 's' : 'p', | 61 | flags & VM_MAYSHARE ? flags & VM_SHARED ? 'S' : 's' : 'p', |
61 | ((loff_t)region->vm_pgoff) << PAGE_SHIFT, | 62 | ((loff_t)region->vm_pgoff) << PAGE_SHIFT, |
62 | MAJOR(dev), MINOR(dev), ino, &len); | 63 | MAJOR(dev), MINOR(dev), ino); |
63 | 64 | ||
64 | if (file) { | 65 | if (file) { |
65 | len = 25 + sizeof(void *) * 6 - len; | 66 | seq_pad(m, ' '); |
66 | if (len < 1) | ||
67 | len = 1; | ||
68 | seq_printf(m, "%*c", len, ' '); | ||
69 | seq_path(m, &file->f_path, ""); | 67 | seq_path(m, &file->f_path, ""); |
70 | } | 68 | } |
71 | 69 | ||