ceph: some documentations fixes
[safe/jmp/linux-2.6] / Documentation / filesystems / seq_file.txt
index 0ab92c2..a1e2e0d 100644 (file)
@@ -46,7 +46,7 @@ better to do. The file is seekable, in that one can do something like the
 following:
 
     dd if=/proc/sequence of=out1 count=1
-    dd if=/proc/sequence skip=1 out=out2 count=1
+    dd if=/proc/sequence skip=1 of=out2 count=1
 
 Then concatenate the output files out1 and out2 and get the right
 result. Yes, it is a thoroughly useless module, but the point is to show
@@ -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
@@ -242,9 +248,7 @@ code, that is done in the initialization code in the usual way:
        {
                struct proc_dir_entry *entry;
 
-               entry = create_proc_entry("sequence", 0, NULL);
-               if (entry)
-                       entry->proc_fops = &ct_file_ops;
+               proc_create("sequence", 0, NULL, &ct_file_ops);
                return 0;
        }