aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-12-08 20:18:57 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-03 22:52:40 -0500
commit8c9379e972e984d11c2b99121847ba9fa7a0c56c (patch)
treeaa348006b91148b67d224d5e5fb29f3bc1644776
parent79e801a906db46cb8efad66c400b01df874b3f12 (diff)
constify seq_file stuff
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/seq_file.c10
-rw-r--r--include/linux/seq_file.h10
2 files changed, 10 insertions, 10 deletions
diff --git a/fs/seq_file.c b/fs/seq_file.c
index dba43c3ea3af..4023d6be939b 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -397,7 +397,7 @@ EXPORT_SYMBOL(seq_printf);
397 * Returns pointer past last written character in @s, or NULL in case of 397 * Returns pointer past last written character in @s, or NULL in case of
398 * failure. 398 * failure.
399 */ 399 */
400char *mangle_path(char *s, char *p, char *esc) 400char *mangle_path(char *s, const char *p, const char *esc)
401{ 401{
402 while (s <= p) { 402 while (s <= p) {
403 char c = *p++; 403 char c = *p++;
@@ -427,7 +427,7 @@ EXPORT_SYMBOL(mangle_path);
427 * return the absolute path of 'path', as represented by the 427 * return the absolute path of 'path', as represented by the
428 * dentry / mnt pair in the path parameter. 428 * dentry / mnt pair in the path parameter.
429 */ 429 */
430int seq_path(struct seq_file *m, struct path *path, char *esc) 430int seq_path(struct seq_file *m, const struct path *path, const char *esc)
431{ 431{
432 char *buf; 432 char *buf;
433 size_t size = seq_get_buf(m, &buf); 433 size_t size = seq_get_buf(m, &buf);
@@ -450,8 +450,8 @@ EXPORT_SYMBOL(seq_path);
450/* 450/*
451 * Same as seq_path, but relative to supplied root. 451 * Same as seq_path, but relative to supplied root.
452 */ 452 */
453int seq_path_root(struct seq_file *m, struct path *path, struct path *root, 453int seq_path_root(struct seq_file *m, const struct path *path,
454 char *esc) 454 const struct path *root, const char *esc)
455{ 455{
456 char *buf; 456 char *buf;
457 size_t size = seq_get_buf(m, &buf); 457 size_t size = seq_get_buf(m, &buf);
@@ -480,7 +480,7 @@ int seq_path_root(struct seq_file *m, struct path *path, struct path *root,
480/* 480/*
481 * returns the path of the 'dentry' from the root of its filesystem. 481 * returns the path of the 'dentry' from the root of its filesystem.
482 */ 482 */
483int seq_dentry(struct seq_file *m, struct dentry *dentry, char *esc) 483int seq_dentry(struct seq_file *m, struct dentry *dentry, const char *esc)
484{ 484{
485 char *buf; 485 char *buf;
486 size_t size = seq_get_buf(m, &buf); 486 size_t size = seq_get_buf(m, &buf);
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index 0b69a4684216..44f1514b00ba 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -74,7 +74,7 @@ static inline void seq_commit(struct seq_file *m, int num)
74 } 74 }
75} 75}
76 76
77char *mangle_path(char *s, char *p, char *esc); 77char *mangle_path(char *s, const char *p, const char *esc);
78int seq_open(struct file *, const struct seq_operations *); 78int seq_open(struct file *, const struct seq_operations *);
79ssize_t seq_read(struct file *, char __user *, size_t, loff_t *); 79ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);
80loff_t seq_lseek(struct file *, loff_t, int); 80loff_t seq_lseek(struct file *, loff_t, int);
@@ -86,10 +86,10 @@ int seq_write(struct seq_file *seq, const void *data, size_t len);
86 86
87__printf(2, 3) int seq_printf(struct seq_file *, const char *, ...); 87__printf(2, 3) int seq_printf(struct seq_file *, const char *, ...);
88 88
89int seq_path(struct seq_file *, struct path *, char *); 89int seq_path(struct seq_file *, const struct path *, const char *);
90int seq_dentry(struct seq_file *, struct dentry *, char *); 90int seq_dentry(struct seq_file *, struct dentry *, const char *);
91int seq_path_root(struct seq_file *m, struct path *path, struct path *root, 91int seq_path_root(struct seq_file *m, const struct path *path,
92 char *esc); 92 const struct path *root, const char *esc);
93int seq_bitmap(struct seq_file *m, const unsigned long *bits, 93int seq_bitmap(struct seq_file *m, const unsigned long *bits,
94 unsigned int nr_bits); 94 unsigned int nr_bits);
95static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask) 95static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask)