* mount.cc (struct opt): Add "dos" and "ihash" options.
(fillout_mntent): Ditto. * path.cc (path_conv::get_nt_native_path): Use path_conv's has_dos_filenames_only method. (path_conv::check): Add PATH_IHASH flag if FS has unreliable inode numbers. (symlink_info::check_shortcut): Or symlink flags to pflags. (symlink_info::check_sysfile): Ditto. Change test accordingly. (symlink_info::check_reparse_point): Ditto. (symlink_info::check_nfs_symlink): Ditto. (symlink_info::check): Check PATH_DOS flag in call to get_nt_native_path to utilize mount flag. Ditto in test for potential restarting. Set PATH_DOS if FS only allows DOS filename rules. * path.h (enum path_types): Add PATH_DOS and PATH_IHASH. (path_conv::hasgood_inode): Check PATH_IHASH instead of fs.hasgood_inode. (path_conv::has_dos_filenames_only): New method. * include/sys/mount.h (MOUNT_DOS): New mount flag. (MOUNT_IHASH): Ditto.
This commit is contained in:
@ -75,6 +75,8 @@ enum path_types
|
||||
PATH_RO = MOUNT_RO,
|
||||
PATH_NOACL = MOUNT_NOACL,
|
||||
PATH_NOPOSIX = MOUNT_NOPOSIX,
|
||||
PATH_DOS = MOUNT_DOS,
|
||||
PATH_IHASH = MOUNT_IHASH,
|
||||
PATH_ALL_EXEC = (PATH_CYGWIN_EXEC | PATH_EXEC),
|
||||
PATH_NO_ACCESS_CHECK = PC_NO_ACCESS_CHECK,
|
||||
PATH_LNK = 0x01000000,
|
||||
@ -106,9 +108,10 @@ class path_conv
|
||||
bool isremote () const {return fs.is_remote_drive ();}
|
||||
ULONG objcaseinsensitive () const {return caseinsensitive;}
|
||||
bool has_acls () const {return !(path_flags & PATH_NOACL) && fs.has_acls (); }
|
||||
bool hasgood_inode () const {return fs.hasgood_inode (); }
|
||||
bool hasgood_inode () const {return !(path_flags & PATH_IHASH); }
|
||||
bool isgood_inode (__ino64_t ino) const;
|
||||
int has_symlinks () const {return path_flags & PATH_HAS_SYMLINKS;}
|
||||
int has_dos_filenames_only () const {return path_flags & PATH_DOS;}
|
||||
int has_buggy_open () const {return fs.has_buggy_open ();}
|
||||
int has_buggy_fileid_dirinfo () const {return fs.has_buggy_fileid_dirinfo ();}
|
||||
int has_buggy_basic_info () const {return fs.has_buggy_basic_info ();}
|
||||
|
Reference in New Issue
Block a user