Commit 8c9379e972e984d11c2b99121847ba9fa7a0c56c

Authored by Al Viro
1 parent 79e801a906

constify seq_file stuff

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 2 changed files with 10 additions and 10 deletions Side-by-side Diff

... ... @@ -397,7 +397,7 @@
397 397 * Returns pointer past last written character in @s, or NULL in case of
398 398 * failure.
399 399 */
400   -char *mangle_path(char *s, char *p, char *esc)
  400 +char *mangle_path(char *s, const char *p, const char *esc)
401 401 {
402 402 while (s <= p) {
403 403 char c = *p++;
... ... @@ -427,7 +427,7 @@
427 427 * return the absolute path of 'path', as represented by the
428 428 * dentry / mnt pair in the path parameter.
429 429 */
430   -int seq_path(struct seq_file *m, struct path *path, char *esc)
  430 +int seq_path(struct seq_file *m, const struct path *path, const char *esc)
431 431 {
432 432 char *buf;
433 433 size_t size = seq_get_buf(m, &buf);
... ... @@ -450,8 +450,8 @@
450 450 /*
451 451 * Same as seq_path, but relative to supplied root.
452 452 */
453   -int seq_path_root(struct seq_file *m, struct path *path, struct path *root,
454   - char *esc)
  453 +int seq_path_root(struct seq_file *m, const struct path *path,
  454 + const struct path *root, const char *esc)
455 455 {
456 456 char *buf;
457 457 size_t size = seq_get_buf(m, &buf);
... ... @@ -480,7 +480,7 @@
480 480 /*
481 481 * returns the path of the 'dentry' from the root of its filesystem.
482 482 */
483   -int seq_dentry(struct seq_file *m, struct dentry *dentry, char *esc)
  483 +int seq_dentry(struct seq_file *m, struct dentry *dentry, const char *esc)
484 484 {
485 485 char *buf;
486 486 size_t size = seq_get_buf(m, &buf);
include/linux/seq_file.h
... ... @@ -74,7 +74,7 @@
74 74 }
75 75 }
76 76  
77   -char *mangle_path(char *s, char *p, char *esc);
  77 +char *mangle_path(char *s, const char *p, const char *esc);
78 78 int seq_open(struct file *, const struct seq_operations *);
79 79 ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);
80 80 loff_t seq_lseek(struct file *, loff_t, int);
... ... @@ -86,10 +86,10 @@
86 86  
87 87 __printf(2, 3) int seq_printf(struct seq_file *, const char *, ...);
88 88  
89   -int seq_path(struct seq_file *, struct path *, char *);
90   -int seq_dentry(struct seq_file *, struct dentry *, char *);
91   -int seq_path_root(struct seq_file *m, struct path *path, struct path *root,
92   - char *esc);
  89 +int seq_path(struct seq_file *, const struct path *, const char *);
  90 +int seq_dentry(struct seq_file *, struct dentry *, const char *);
  91 +int seq_path_root(struct seq_file *m, const struct path *path,
  92 + const struct path *root, const char *esc);
93 93 int seq_bitmap(struct seq_file *m, const unsigned long *bits,
94 94 unsigned int nr_bits);
95 95 static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask)