Skip to content

Commit 50e638b

Browse files
tobluxMiklos Szeredi
authored andcommitted
ovl: Use str_on_off() helper in ovl_show_options()
Remove hard-coded strings by using the str_on_off() helper function. Acked-by: Amir Goldstein <[email protected]> Signed-off-by: Thorsten Blum <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
1 parent b71db54 commit 50e638b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/overlayfs/params.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,17 +1051,16 @@ int ovl_show_options(struct seq_file *m, struct dentry *dentry)
10511051
seq_printf(m, ",redirect_dir=%s",
10521052
ovl_redirect_mode(&ofs->config));
10531053
if (ofs->config.index != ovl_index_def)
1054-
seq_printf(m, ",index=%s", ofs->config.index ? "on" : "off");
1054+
seq_printf(m, ",index=%s", str_on_off(ofs->config.index));
10551055
if (ofs->config.uuid != ovl_uuid_def())
10561056
seq_printf(m, ",uuid=%s", ovl_uuid_mode(&ofs->config));
10571057
if (ofs->config.nfs_export != ovl_nfs_export_def)
1058-
seq_printf(m, ",nfs_export=%s", ofs->config.nfs_export ?
1059-
"on" : "off");
1058+
seq_printf(m, ",nfs_export=%s",
1059+
str_on_off(ofs->config.nfs_export));
10601060
if (ofs->config.xino != ovl_xino_def() && !ovl_same_fs(ofs))
10611061
seq_printf(m, ",xino=%s", ovl_xino_mode(&ofs->config));
10621062
if (ofs->config.metacopy != ovl_metacopy_def)
1063-
seq_printf(m, ",metacopy=%s",
1064-
ofs->config.metacopy ? "on" : "off");
1063+
seq_printf(m, ",metacopy=%s", str_on_off(ofs->config.metacopy));
10651064
if (ofs->config.ovl_volatile)
10661065
seq_puts(m, ",volatile");
10671066
if (ofs->config.userxattr)

0 commit comments

Comments
 (0)