summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dtable.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc17
1 files changed, 6 insertions, 11 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 0f995e4290..14245e6aa 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -282,7 +282,7 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle)
CONSOLE_SCREEN_BUFFER_INFO buf;
DCB dcb;
unsigned bin = O_BINARY;
- device dev = {};
+ device dev;
first_fd_for_open = 0;
@@ -451,7 +451,7 @@ build_fh_dev (const device& dev, const char *unix_name)
if (unix_name)
pc.set_posix (unix_name);
else
- pc.set_posix (dev.name);
+ pc.set_posix (dev.name ());
return build_fh_pc (pc);
}
@@ -476,13 +476,8 @@ fh_alloc (path_conv& pc)
case DEV_FLOPPY_MAJOR:
case DEV_CDROM_MAJOR:
case DEV_SD_MAJOR:
- case DEV_SD1_MAJOR:
- case DEV_SD2_MAJOR:
- case DEV_SD3_MAJOR:
- case DEV_SD4_MAJOR:
- case DEV_SD5_MAJOR:
- case DEV_SD6_MAJOR:
- case DEV_SD7_MAJOR:
+ case DEV_SD1_MAJOR ... DEV_SD7_MAJOR:
+ case DEV_SD_HIGHPART_START ... DEV_SD_HIGHPART_END:
fh = cnew (fhandler_dev_floppy);
break;
case DEV_TAPE_MAJOR:
@@ -646,14 +641,14 @@ build_fh_pc (path_conv& pc)
debug_printf ("found an archetype for %s(%d/%d) io_handle %p", fh->get_name (), fh->dev ().get_major (), fh->dev ().get_minor (),
fh->archetype->get_io_handle ());
if (!fh->get_name ())
- fh->set_name (fh->archetype->dev ().name);
+ fh->set_name (fh->archetype->dev ().name ());
}
else if (cygwin_finished_initializing && !pc.isopen ())
fh->set_name (pc);
else
{
if (!fh->get_name ())
- fh->set_name (fh->dev ().native);
+ fh->set_name (fh->dev ().native ());
fh->archetype = fh->clone ();
debug_printf ("created an archetype (%p) for %s(%d/%d)", fh->archetype, fh->get_name (), fh->dev ().get_major (), fh->dev ().get_minor ());
fh->archetype->archetype = NULL;