Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fs/ntfs3: Add hidedotfiles option

With this option all files with filename[0] == '.'
will have FILE_ATTRIBUTE_HIDDEN attribute.

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>

+10
+4
fs/ntfs3/inode.c
··· 1257 1257 fa = FILE_ATTRIBUTE_ARCHIVE; 1258 1258 } 1259 1259 1260 + /* If option "hidedotfiles" then set hidden attribute for dot files. */ 1261 + if (sbi->options->hide_dot_files && name->name[0] == '.') 1262 + fa |= FILE_ATTRIBUTE_HIDDEN; 1263 + 1260 1264 if (!(mode & 0222)) 1261 1265 fa |= FILE_ATTRIBUTE_READONLY; 1262 1266
+1
fs/ntfs3/ntfs_fs.h
··· 97 97 unsigned sparse : 1; /* Create sparse files. */ 98 98 unsigned showmeta : 1; /* Show meta files. */ 99 99 unsigned nohidden : 1; /* Do not show hidden files. */ 100 + unsigned hide_dot_files : 1; /* Set hidden flag on dot files. */ 100 101 unsigned force : 1; /* RW mount dirty volume. */ 101 102 unsigned noacsrules : 1; /* Exclude acs rules. */ 102 103 unsigned prealloc : 1; /* Preallocate space when file is growing. */
+5
fs/ntfs3/super.c
··· 247 247 Opt_force, 248 248 Opt_sparse, 249 249 Opt_nohidden, 250 + Opt_hide_dot_files, 250 251 Opt_showmeta, 251 252 Opt_acl, 252 253 Opt_iocharset, ··· 267 266 fsparam_flag_no("force", Opt_force), 268 267 fsparam_flag_no("sparse", Opt_sparse), 269 268 fsparam_flag_no("hidden", Opt_nohidden), 269 + fsparam_flag_no("hidedotfiles", Opt_hide_dot_files), 270 270 fsparam_flag_no("acl", Opt_acl), 271 271 fsparam_flag_no("showmeta", Opt_showmeta), 272 272 fsparam_flag_no("prealloc", Opt_prealloc), ··· 355 353 break; 356 354 case Opt_nohidden: 357 355 opts->nohidden = result.negated ? 1 : 0; 356 + break; 357 + case Opt_hide_dot_files: 358 + opts->hide_dot_files = result.negated ? 1 : 0; 358 359 break; 359 360 case Opt_acl: 360 361 if (!result.negated)