aboutsummaryrefslogtreecommitdiffstats
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 15:24:30 -0400
commit3ae35cde67c1ec50267bcc55d81f4953b5f637c2 (patch)
tree5c204b2673893937e448bef3418085ba6dc3f055
parent30706a545417af50f07b8e47cc2189a2e20a4636 (diff)
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>
-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 85ea98d139fc..d70e551f0bfb 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)
357 seq_printf(s, "loose"); 357 seq_printf(s, "loose");
358} 358}
359 359
360static void
361cifs_show_nls(struct seq_file *s, struct nls_table *cur)
362{
363 struct nls_table *def;
364
365 /* Display iocharset= option if it's not default charset */
366 def = load_nls_default();
367 if (def != cur)
368 seq_printf(s, ",iocharset=%s", cur->charset);
369 unload_nls(def);
370}
371
360/* 372/*
361 * cifs_show_options() is for displaying mount options in /proc/mounts. 373 * cifs_show_options() is for displaying mount options in /proc/mounts.
362 * Not all settable options are displayed but most of the important 374 * 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)
418 seq_printf(s, ",file_mode=0%ho,dir_mode=0%ho", 430 seq_printf(s, ",file_mode=0%ho,dir_mode=0%ho",
419 cifs_sb->mnt_file_mode, 431 cifs_sb->mnt_file_mode,
420 cifs_sb->mnt_dir_mode); 432 cifs_sb->mnt_dir_mode);
433
434 cifs_show_nls(s, cifs_sb->local_nls);
435
421 if (tcon->seal) 436 if (tcon->seal)
422 seq_printf(s, ",seal"); 437 seq_printf(s, ",seal");
423 if (tcon->nocase) 438 if (tcon->nocase)