projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[cascardo/linux.git]
/
fs
/
proc
/
task_nommu.c
diff --git
a/fs/proc/task_nommu.c
b/fs/proc/task_nommu.c
index
56123a6
..
678455d
100644
(file)
--- a/
fs/proc/task_nommu.c
+++ b/
fs/proc/task_nommu.c
@@
-123,14
+123,6
@@
unsigned long task_statm(struct mm_struct *mm,
return size;
}
return size;
}
-static void pad_len_spaces(struct seq_file *m, int len)
-{
- len = 25 + sizeof(void*) * 6 - len;
- if (len < 1)
- len = 1;
- seq_printf(m, "%*c", len, ' ');
-}
-
/*
* display a single VMA to a sequenced file
*/
/*
* display a single VMA to a sequenced file
*/
@@
-142,7
+134,7
@@
static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
unsigned long ino = 0;
struct file *file;
dev_t dev = 0;
unsigned long ino = 0;
struct file *file;
dev_t dev = 0;
- int flags
, len
;
+ int flags;
unsigned long long pgoff = 0;
flags = vma->vm_flags;
unsigned long long pgoff = 0;
flags = vma->vm_flags;
@@
-155,8
+147,9
@@
static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
}
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
}
+ seq_setwidth(m, 25 + sizeof(void *) * 6 - 1);
seq_printf(m,
seq_printf(m,
- "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu
%n
",
+ "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu ",
vma->vm_start,
vma->vm_end,
flags & VM_READ ? 'r' : '-',
vma->vm_start,
vma->vm_end,
flags & VM_READ ? 'r' : '-',
@@
-164,16
+157,16
@@
static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
flags & VM_EXEC ? 'x' : '-',
flags & VM_MAYSHARE ? flags & VM_SHARED ? 'S' : 's' : 'p',
pgoff,
flags & VM_EXEC ? 'x' : '-',
flags & VM_MAYSHARE ? flags & VM_SHARED ? 'S' : 's' : 'p',
pgoff,
- MAJOR(dev), MINOR(dev), ino
, &len
);
+ MAJOR(dev), MINOR(dev), ino);
if (file) {
if (file) {
-
pad_len_spaces(m, len
);
+
seq_pad(m, ' '
);
seq_path(m, &file->f_path, "");
} else if (mm) {
pid_t tid = vm_is_stack(priv->task, vma, is_pid);
if (tid != 0) {
seq_path(m, &file->f_path, "");
} else if (mm) {
pid_t tid = vm_is_stack(priv->task, vma, is_pid);
if (tid != 0) {
-
pad_len_spaces(m, len
);
+
seq_pad(m, ' '
);
/*
* Thread stack in /proc/PID/task/TID/maps or
* the main process stack.
/*
* Thread stack in /proc/PID/task/TID/maps or
* the main process stack.