* 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.
This commit is contained in:
@@ -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]; }
|
||||
|
Reference in New Issue
Block a user