summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2013-07-30 13:34:40 -0400
committerSteve French <smfrench@gmail.com>2013-09-08 14:24:30 -0500
commit3ae35cde67c1ec50267bcc55d81f4953b5f637c2 (patch)
tree5c204b2673893937e448bef3418085ba6dc3f055 /fs/cifs
parent30706a545417af50f07b8e47cc2189a2e20a4636 (diff)
downloadop-kernel-dev-3ae35cde67c1ec50267bcc55d81f4953b5f637c2.zip
op-kernel-dev-3ae35cde67c1ec50267bcc55d81f4953b5f637c2.tar.gz
cifs: display iocharset= option in /proc/mounts
...but only if it's not the default charset. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifsfs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 85ea98d..d70e551f 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -357,6 +357,18 @@ cifs_show_cache_flavor(struct seq_file *s, struct cifs_sb_info *cifs_sb)
seq_printf(s, "loose");
}
+static void
+cifs_show_nls(struct seq_file *s, struct nls_table *cur)
+{
+ struct nls_table *def;
+
+ /* Display iocharset= option if it's not default charset */
+ def = load_nls_default();
+ if (def != cur)
+ seq_printf(s, ",iocharset=%s", cur->charset);
+ unload_nls(def);
+}
+
/*
* cifs_show_options() is for displaying mount options in /proc/mounts.
* Not all settable options are displayed but most of the important
@@ -418,6 +430,9 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
seq_printf(s, ",file_mode=0%ho,dir_mode=0%ho",
cifs_sb->mnt_file_mode,
cifs_sb->mnt_dir_mode);
+
+ cifs_show_nls(s, cifs_sb->local_nls);
+
if (tcon->seal)
seq_printf(s, ",seal");
if (tcon->nocase)
OpenPOWER on IntegriCloud