Skip to content

Commit

Permalink
cifs: display iocharset= option in /proc/mounts
Browse files Browse the repository at this point in the history
...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>
  • Loading branch information
Jeff Layton authored and Steve French committed Sep 8, 2013
1 parent 30706a5 commit 3ae35cd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3ae35cd

Please sign in to comment.