* dtable.cc (dtable::build_fhandler): Accept an optional path_conv argument.
If available, use this to calculate path name and device number. * dtable.h (dtable): Reflect above change. * fhandler.h (fhandler_base): Declare virtual method which accepts path_conv rather than path string as first argument. * fhandler.cc (fhandler_base::open): Define above new method. * syscalls.cc (_open): Set aside a path_conv variable for use in build_fhandler and subsequent call to open.
This commit is contained in:
@@ -228,12 +228,20 @@ cygwin_attach_handle_to_fd (char *name, int fd, HANDLE handle, mode_t bin,
|
||||
}
|
||||
|
||||
fhandler_base *
|
||||
dtable::build_fhandler (int fd, const char *name, HANDLE handle)
|
||||
dtable::build_fhandler (int fd, const char *name, HANDLE handle, path_conv *pc)
|
||||
{
|
||||
int unit;
|
||||
DWORD devn;
|
||||
|
||||
if ((devn = get_device_number (name, unit)) == FH_BAD)
|
||||
if (!pc)
|
||||
devn = get_device_number (name, unit);
|
||||
else
|
||||
{
|
||||
pc->check (name);
|
||||
devn = pc->get_devn ();
|
||||
}
|
||||
|
||||
if (devn == FH_BAD)
|
||||
{
|
||||
struct sockaddr sa;
|
||||
int sal = sizeof (sa);
|
||||
|
Reference in New Issue
Block a user