Commit 3f3a4378 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Restore /proc/pid/maps formatting

The seq_file conversion of /proc/pid/maps caused altered behaviour with
respect to 2.4.22.  Before the conversion, spaces and tabs in filenames were
displayed verbatim.  After the conversion they are escaped as \040, etc.

Also, if the mmapped file has been unlinked the output appears as

40017000-40018000 rw-p 00000000 03:02 1425800    /home/akpm/foo\040(deleted)

instead of

40017000-40018000 rw-p 00000000 03:02 1425800    /home/akpm/foo (deleted)

This could break applications which parse /proc/pid/maps (one person has
reported this).

The patch restores the 2.4.20 behaviour.
parent e5d9d44e
......@@ -105,7 +105,7 @@ static int show_map(struct seq_file *m, void *v)
if (len < 1)
len = 1;
seq_printf(m, "%*c", len, ' ');
seq_path(m, file->f_vfsmnt, file->f_dentry, " \t\n\\");
seq_path(m, file->f_vfsmnt, file->f_dentry, "");
}
seq_putc(m, '\n');
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment