From bdb48f5bf0893d847a2935540f25d3a1659a4e13 Mon Sep 17 00:00:00 2001 From: Jonathan Corbet Date: Fri, 25 Apr 2008 11:56:37 -0600 Subject: [PATCH] --- yaml --- r: 92965 b: refs/heads/master c: 9f4def9ae4772ea3da5e2359de698742ebae53b5 h: refs/heads/master i: 92963: f610c56dc908de9d9b4558a3455ed1d826e7e46b v: v3 --- [refs] | 2 +- trunk/Documentation/filesystems/seq_file.txt | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 357c95e056bc..1c1af5d9557a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0fe8a3ce73ef31d1480e82798503948a979e8e52 +refs/heads/master: 9f4def9ae4772ea3da5e2359de698742ebae53b5 diff --git a/trunk/Documentation/filesystems/seq_file.txt b/trunk/Documentation/filesystems/seq_file.txt index 0ab92c260894..b843743aa0b5 100644 --- a/trunk/Documentation/filesystems/seq_file.txt +++ b/trunk/Documentation/filesystems/seq_file.txt @@ -187,12 +187,18 @@ The first two output a single character and a string, just like one would expect. seq_escape() is like seq_puts(), except that any character in s which is in the string esc will be represented in octal form in the output. -There is also a function for printing filenames: +There is also a pair of functions for printing filenames: int seq_path(struct seq_file *m, struct path *path, char *esc); + int seq_path_root(struct seq_file *m, struct path *path, + struct path *root, char *esc) Here, path indicates the file of interest, and esc is a set of characters -which should be escaped in the output. +which should be escaped in the output. A call to seq_path() will output +the path relative to the current process's filesystem root. If a different +root is desired, it can be used with seq_path_root(). Note that, if it +turns out that path cannot be reached from root, the value of root will be +changed in seq_file_root() to a root which *does* work. Making it all work