From: Chuck Lever <[email protected]> Add case sensitivity reporting to the existing hfsplus_fileattr_get() function. HFS+ always preserves case at rest.
Case sensitivity depends on how the volume was formatted: HFSX volumes may be either case-sensitive or case-insensitive, indicated by the HFSPLUS_SB_CASEFOLD superblock flag. Reviewed-by: Viacheslav Dubeyko <[email protected]> Signed-off-by: Chuck Lever <[email protected]> --- fs/hfsplus/inode.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 7ae6745ca7ae..7889d37f5c85 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c @@ -694,6 +694,7 @@ int hfsplus_fileattr_get(struct dentry *dentry, struct file_kattr *fa) { struct inode *inode = d_inode(dentry); struct hfsplus_inode_info *hip = HFSPLUS_I(inode); + struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb); unsigned int flags = 0; if (inode->i_flags & S_IMMUTABLE) @@ -705,6 +706,12 @@ int hfsplus_fileattr_get(struct dentry *dentry, struct file_kattr *fa) fileattr_fill_flags(fa, flags); + /* + * HFS+ preserves case (the default). Case sensitivity depends + * on how the filesystem was formatted: HFSX volumes may be + * either case-sensitive or case-insensitive. + */ + fa->case_insensitive = test_bit(HFSPLUS_SB_CASEFOLD, &sbi->flags); return 0; } -- 2.52.0 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
