mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-28 12:05:47 +08:00
* winsup.h (access_worker): Declare with added fhandler_base parameter.
* syscalls.cc (access_worker): Accommodate extra fhandler_base argument. Use it instead of stat_worker to determine stat information, when appropriate. * fhandler.cc (fhandler_base::device_access_denied): Pass fhandler pointer to access_worker so that it can use the proper method for determining stat information. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto.
This commit is contained in:
parent
228f99a6c1
commit
9908d9977b
@ -1,3 +1,14 @@
|
|||||||
|
2003-12-14 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* winsup.h (access_worker): Declare with added fhandler_base parameter.
|
||||||
|
* syscalls.cc (access_worker): Accommodate extra fhandler_base
|
||||||
|
argument. Use it instead of stat_worker to determine stat information,
|
||||||
|
when appropriate.
|
||||||
|
* fhandler.cc (fhandler_base::device_access_denied): Pass fhandler
|
||||||
|
pointer to access_worker so that it can use the proper method for
|
||||||
|
determining stat information.
|
||||||
|
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto.
|
||||||
|
|
||||||
2003-12-14 Christopher Faylor <cgf@redhat.com>
|
2003-12-14 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* exceptions.cc (ctrl_c_handler): Remove this thread from the signal
|
* exceptions.cc (ctrl_c_handler): Remove this thread from the signal
|
||||||
|
@ -328,7 +328,7 @@ fhandler_base::device_access_denied (int flags)
|
|||||||
if (!mode)
|
if (!mode)
|
||||||
mode |= R_OK;
|
mode |= R_OK;
|
||||||
|
|
||||||
return access_worker (pc, mode);
|
return access_worker (pc, mode, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open system call handler function. */
|
/* Open system call handler function. */
|
||||||
|
@ -632,7 +632,7 @@ fhandler_disk_file::opendir ()
|
|||||||
set_errno (ENOMEM);
|
set_errno (ENOMEM);
|
||||||
goto free_dirname;
|
goto free_dirname;
|
||||||
}
|
}
|
||||||
else if (access_worker (pc, R_OK) != 0)
|
else if (access_worker (pc, R_OK, this) != 0)
|
||||||
goto free_dirent;
|
goto free_dirent;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -556,7 +556,7 @@ path_conv::check (const char *src, unsigned opt,
|
|||||||
if (dev.major == DEV_CYGDRIVE_MAJOR)
|
if (dev.major == DEV_CYGDRIVE_MAJOR)
|
||||||
{
|
{
|
||||||
if (!component)
|
if (!component)
|
||||||
fileattr = FILE_ATTRIBUTE_DIRECTORY;
|
fileattr = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_READONLY;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dev.devn = FH_FS;
|
dev.devn = FH_FS;
|
||||||
|
@ -1240,7 +1240,7 @@ lstat (const char *name, struct __stat32 *buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
access_worker (path_conv& real_path, int flags)
|
access_worker (path_conv& real_path, int flags, fhandler_base *fh)
|
||||||
{
|
{
|
||||||
if (real_path.error)
|
if (real_path.error)
|
||||||
{
|
{
|
||||||
@ -1268,7 +1268,7 @@ access_worker (path_conv& real_path, int flags)
|
|||||||
return check_file_access (real_path, flags);
|
return check_file_access (real_path, flags);
|
||||||
|
|
||||||
struct __stat64 st;
|
struct __stat64 st;
|
||||||
int r = stat_worker (real_path, &st, 0);
|
int r = fh ? fh->fstat (&st) : stat_worker (real_path, &st, 0);
|
||||||
if (r)
|
if (r)
|
||||||
return -1;
|
return -1;
|
||||||
r = -1;
|
r = -1;
|
||||||
|
@ -296,7 +296,7 @@ int symlink_worker (const char *, const char *, bool, bool)
|
|||||||
__attribute__ ((regparm (3)));
|
__attribute__ ((regparm (3)));
|
||||||
|
|
||||||
class path_conv;
|
class path_conv;
|
||||||
int access_worker (path_conv&, int) __attribute__ ((regparm (2)));
|
int access_worker (path_conv&, int, class fhandler_base * = NULL) __attribute__ ((regparm (3)));
|
||||||
|
|
||||||
int fcntl_worker (int fd, int cmd, void *arg);
|
int fcntl_worker (int fd, int cmd, void *arg);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user