diff options
| author | Andi Kleen <ak@muc.de> | 2003-08-30 22:31:55 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-08-30 22:31:55 -0700 |
| commit | 61dd354a0a94d09b8e664bf4ab2dcbbbd082d220 (patch) | |
| tree | 0ce8479460b5e61371e50ef9221cb90cb850c546 | |
| parent | 94142c32a003694d3afd677f4c4aa0434f9d7414 (diff) | |
[PATCH] Do 32bit addresses in /proc/self/maps if possible
As discussed earlier. This implements Linus' idea of printing
the addresses in /proc/<pid>/maps as 32bit if possible.
This works around some broken 32bit programs that cannot parse
64bit addresses as generated by x86-64 kernels.
Also simplifies the code slightly.
| -rw-r--r-- | fs/proc/task_mmu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 3d7d759c63da..3a1c3cb2d7a6 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -90,14 +90,14 @@ static int show_map(struct seq_file *m, void *v) ino = inode->i_ino; } - seq_printf(m, "%0*lx-%0*lx %c%c%c%c %0*lx %02x:%02x %lu %n", - (int) (2*sizeof(void*)), map->vm_start, - (int) (2*sizeof(void*)), map->vm_end, + seq_printf(m, "%08lx-%08lx %c%c%c%c %08lx %02x:%02x %lu %n", + map->vm_start, + map->vm_end, flags & VM_READ ? 'r' : '-', flags & VM_WRITE ? 'w' : '-', flags & VM_EXEC ? 'x' : '-', flags & VM_MAYSHARE ? 's' : 'p', - (int) (2*sizeof(void*)), map->vm_pgoff << PAGE_SHIFT, + map->vm_pgoff << PAGE_SHIFT, MAJOR(dev), MINOR(dev), ino, &len); if (map->vm_file) { |
