* fhandler.h (enum dirent_states): Remove dirent_saw_cygdrive,
dirent_saw_dev and dirent_saw_proc. (fhandler_cygdrive::open): Declare. (fhandler_cygdrive::close): Declare. * fhandler_disk_file.cc (class __DIR_mounts): Move to beginning of file. (__DIR_mounts::check_mount): New parameter to indicate if inode number is needed in calling function or not. Add /proc and /cygdrive handling. (__DIR_mounts::check_missing_mount): Ditto. (path_conv::ndisk_links): Use __DIR_mounts class to create correct hardlink count for directories with mount points in them. (fhandler_disk_file::readdir_helper): Remove /dev, /proc and /cygdrive handling. (fhandler_cygdrive::open): New method. (fhandler_cygdrive::close): New method. (fhandler_cygdrive::fstat): Always return fixed inode number 2 and fixed link count of 1. Drop call to set_drives. (fhandler_cygdrive::opendir): Drop call to get_namehash. (fhandler_cygdrive::readdir): Handle "." entry to return fixed inode number 2.
This commit is contained in:
@ -45,11 +45,8 @@ enum dirent_states
|
||||
dirent_saw_dot_dot = 0x0002,
|
||||
dirent_saw_eof = 0x0004,
|
||||
dirent_isroot = 0x0008,
|
||||
dirent_saw_cygdrive = 0x0010,
|
||||
dirent_saw_dev = 0x0020,
|
||||
dirent_saw_proc = 0x0040,
|
||||
dirent_set_d_ino = 0x0080,
|
||||
dirent_get_d_ino = 0x0100
|
||||
dirent_set_d_ino = 0x0010,
|
||||
dirent_get_d_ino = 0x0020
|
||||
};
|
||||
|
||||
enum conn_state
|
||||
@ -697,6 +694,8 @@ class fhandler_cygdrive: public fhandler_disk_file
|
||||
void set_drives ();
|
||||
public:
|
||||
fhandler_cygdrive ();
|
||||
int open (int flags, mode_t mode);
|
||||
int close ();
|
||||
DIR *opendir ();
|
||||
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
|
||||
void rewinddir (DIR *);
|
||||
|
Reference in New Issue
Block a user