From 8d817b0f9ed20cfa5e9482074999c2973a2a9543 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 5 Oct 2001 04:21:41 +0000 Subject: Add second path_conv * argument to fstat()s throughout. * fhandler.h: Change read and fstat to regparm/stdcall throughout. (fhandler_base::fstat): Just declare. Don't define. (fhandler_disk_file::fstat_helper): Declare. * fhandler.cc (fhandler_base::fstat): Move here from fhandler.h, adapt from former stat_dev(). (fhandler_disk_file::fstat): Move most of the disk-file-specific logic from stat_worker to here. Use fstat_helper to derive final fstat output. (fhandler_disk_file::fstat_helper): New method, renamed from former fstat method. (num_entries): Moved here from syscalls.cc. * fhandler_mem.cc (fhandler_dev_mem::fstat): Use base class to initialize most stuff. Invert has_physical_mem_access test for establishing permissions. * fhandler_raw.cc (fhandler_dev_raw::fstat): Eliminate unneed test and memory clearing. Use base class to initialize most stuff. * syscalls.cc (stat_dev): Eliminate. (stat_worker): Simply call fstat method to generate fstat output. Move all device specific code to appropriate fstats. * dir.cc (opendir): Pass correct arg to stat_worker to allow following symlinks. --- winsup/cygwin/dir.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winsup/cygwin/dir.cc') diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index 39ec9e9d9..6ca1695ed 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -85,7 +85,7 @@ opendir (const char *dirname) path_conv real_dirname; - if (stat_worker (dirname, &statbuf, 1, &real_dirname) == -1) + if (stat_worker (dirname, &statbuf, 0, &real_dirname) == -1) goto failed; if (!(statbuf.st_mode & S_IFDIR)) -- cgit v1.2.3