Skip to contentSkip to conversation

Documentation: update seq_file

PATCH RESEND Superseded Dmitry V. Levin 2 participants 3 messages Sep 29, 2014 – Dec 29, 2014 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH RESEND v3 1/3 Documentation: update seq_file

Date: Wed, 17 Oct 2012 20:29:22 +0400

Starting with commit v3.2-rc4-1-g02125a8, seq_path_root() no longer changes the value of root.
Starting with commit v3.2-rc7-104-g8c9379e, some arguments of seq_path() and seq_path_root() are const.

---
 Documentation/filesystems/seq_file.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Documentation/filesystems/seq_file.txt +6 -6
index 8ea3e90..a193c1d 100644
@@ -198,16 +198,16 @@ which is in the string esc will be represented in octal form in the output.
 
 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)
+	int seq_path(struct seq_file *m, const struct path *path,
+		     const char *esc);
+	int seq_path_root(struct seq_file *m, const struct path *path,
+			  const struct path *root, const char *esc)
 
 Here, path indicates the file of interest, and esc is a set of characters
 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.
+root is desired, it can be used with seq_path_root().  If it turns out that
+path cannot be reached from root, seq_path_root() returns SEQ_SKIP.
 
 
 Making it all work
Signature · 1 line
ldv
#1 lore raw

PATCH RESEND v4 1/1 Documentation: update seq_file

Date: Wed, 17 Oct 2012 20:29:22 +0400

Update descriptions of seq_path() and seq_path_root():
starting with commit v3.2-rc4-1-g02125a8, seq_path_root() no longer changes the value of root;
starting with commit v3.2-rc7-104-g8c9379e, some arguments of seq_path() and seq_path_root() are const.

---
 Documentation/filesystems/seq_file.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Documentation/filesystems/seq_file.txt +6 -6
index b797ed3..9de4303 100644
@@ -194,16 +194,16 @@ which is in the string esc will be represented in octal form in the output.
 
 There are 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)
+	int seq_path(struct seq_file *m, const struct path *path,
+		     const char *esc);
+	int seq_path_root(struct seq_file *m, const struct path *path,
+			  const struct path *root, const char *esc)
 
 Here, path indicates the file of interest, and esc is a set of characters
 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.
+root is desired, it can be used with seq_path_root().  If it turns out that
+path cannot be reached from root, seq_path_root() returns SEQ_SKIP.
 
 A function producing complicated output may want to check
 	bool seq_has_overflowed(struct seq_file *m);
Signature · 1 line
ldv
maintainer Applied
#2 lore raw
Quoted 1 line · On Tue, 16 Dec 2014 06:37:57 +0300 "Dmitry V. Levin" <[email protected]> wrote:

Update descriptions of seq_path() and seq_path_root():

Applied, thanks.

jon