Re: RFC - how to quota special characters in filenames in /proc files

Andries.Brouwer@cwi.nl
Mon, 3 Sep 2001 14:01:47 GMT


From: Neil Brown <neilb@cse.unsw.edu.au>

I am interested in opinions that people might have on how to quote
special characters in filenames in files in /proc.

Is there any convention already used in some other part of the
kernel?

/proc/mounts does what mount does - it uses octal escapes:

# mount /dev/sr0 "/a b" -r -t iso9660
# mount | tail -1
/dev/sr0 on /a b type iso9660 (ro)
# cat /proc/mounts | tail -1
/dev/sr0 /a\040b iso9660 ro 0 0
#

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/