From 4ab6034f50e5783151699f2c0b146f090980e183 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 2 Oct 2001 01:58:06 +0000 Subject: * dtable.h (dtable::build_fhandler): Make path_conv parameter non-optional. (dtable::init_std_file_from_handle): Eliminate name parameter. * dtable.cc (stdio_init): Don't pass bogus name to init_std_file_from_handle. The function will figure out the name itself. (dtable::init_std_file_from_handle): Eliminate name parameter. Assume that we're always called with an appropriate fd. Pass name as NULL if we can't simply figure it out from context. (cygwin_attach_handle_to_fd): Pass path_conv argument to build_fhandler. (dtable::build_fhandler): Make path_conv argument mandatory. Eliminate specific call to get_device_number. With unknown device names, set name from handle context for parsing by path_conv. (dtable::build_fhandler): Pass path_conv argument to build_fhandler. * path.h (path_conv::set_isdisk): Set disk device type. (path_conv::is_device): Don't consider FH_DISK a "device". * syscalls.cc (_open): Pass path_conv argument by reference. (stat_worker): Ditto. (_rename): Use path_conv operators. Add bounds to DeleteFile/MoveFile for loop. --- winsup/cygwin/dtable.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'winsup/cygwin/dtable.h') diff --git a/winsup/cygwin/dtable.h b/winsup/cygwin/dtable.h index 0f00bd060..0a00d91f5 100644 --- a/winsup/cygwin/dtable.h +++ b/winsup/cygwin/dtable.h @@ -50,9 +50,9 @@ public: void fixup_after_fork (HANDLE); fhandler_base *build_fhandler (int fd, DWORD dev, const char *name, int unit = -1); - fhandler_base *build_fhandler (int fd, const char *name, HANDLE h = NULL, - path_conv *pc = NULL, - unsigned opts = PC_SYM_FOLLOW, suffix_info *si = NULL); + fhandler_base *build_fhandler (int fd, const char *name, HANDLE h, + path_conv& pc, unsigned opts = PC_SYM_FOLLOW, + suffix_info *si = NULL); inline int not_open (int fd) { SetResourceLock (LOCK_FD_LIST, READ_LOCK, "not_open"); @@ -66,7 +66,7 @@ public: int find_unused_handle (int start); int find_unused_handle () { return find_unused_handle (first_fd_for_open);} void release (int fd); - void init_std_file_from_handle (int fd, HANDLE handle, DWORD access, const char *name); + void init_std_file_from_handle (int fd, HANDLE handle, DWORD access); int dup2 (int oldfd, int newfd); void fixup_after_exec (HANDLE); inline fhandler_base *operator [](int fd) const { return fds[fd]; } -- cgit v1.2.3