* fhandler.h (fhandler_dev::open): Declare.

(fhandler_dev::close): Declare.
	(fhandler_dev::fstat): Declare.
	(fhandler_dev::fstatvfs): Declare.
	(fhandler_cygdrive::fstatvfs): Declare.
	* fhandler_dev.cc (fhandler_dev::open): New method.
	(fhandler_dev::close): Ditto.
	(fhandler_dev::fstat): Ditto.
	(fhandler_dev::fstatvfs): Ditto.
	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Don't fill
	st_rdev.
	(fhandler_cygdrive::fstatvfs): New method.
	* path.h (path_conv::fs_got_fs): New method.
	* mount.h (fs_info::got_fs): Change type to bool, make public.
This commit is contained in:
Corinna Vinschen
2012-04-02 11:08:07 +00:00
parent 5346e8aebb
commit da8274643c
6 changed files with 113 additions and 3 deletions

View File

@ -508,7 +508,7 @@ fhandler_base::fstat_helper (struct __stat64 *buf,
: (PFILETIME) &pfnoi->LastWriteTime,
&buf->st_ctim);
to_timestruc_t ((PFILETIME) &pfnoi->CreationTime, &buf->st_birthtim);
buf->st_rdev = buf->st_dev = get_dev ();
buf->st_dev = get_dev ();
/* CV 2011-01-13: Observations on the Cygwin mailing list point to an
interesting behaviour in some Windows versions. Apparently the size of
a directory is computed at the time the directory is first scanned. This
@ -2412,6 +2412,17 @@ fhandler_cygdrive::fstat (struct __stat64 *buf)
return 0;
}
int __stdcall
fhandler_cygdrive::fstatvfs (struct statvfs *sfs)
{
/* Virtual file system. Just return an empty buffer with a few values
set to something useful. Just as on Linux. */
memset (sfs, 0, sizeof (*sfs));
sfs->f_bsize = sfs->f_frsize = 4096;
sfs->f_namemax = NAME_MAX;
return 0;
}
DIR *
fhandler_cygdrive::opendir (int fd)
{