From 0e1ba88882c97c5ab78fb000af5d59f8b1842776 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 1 Oct 2003 12:36:39 +0000 Subject: * Makefile.in: Add YA method for generating devices.cc. * child_info.h: YA update of another magic number. * gendevices: New file. * devices.in: New file. * devices.cc: Regenerate. * devices.shilka: Remove. * devices.h: Correctly define device pointers. (device): Remove now obsolete fields. (device::native): Renamed from device::fmt. * dtable.cc (build_fh_dev): Simplify in light of new unit parsing scheme. (build_fh_pc): Ditto. * path.cc (win32_device_name): Ditto. * fhandler.h (fhandler_base::get_native_name): Reflect renaming of fmt to native. * fhandler_tty.cc (fhandler_tty_mster::init): Initialize slave device prior to reporting unit. --- winsup/cygwin/path.cc | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'winsup/cygwin/path.cc') diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 8850823db..90bb9be82 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -899,22 +899,8 @@ static BOOL win32_device_name (const char *src_path, char *win32_path, device& dev) { dev.parse (src_path); - - if (dev.devn == FH_FS) - return false; - - switch (dev.major) - { - case DEV_TAPE_MAJOR: - __small_sprintf (win32_path, dev.fmt, dev.minor % 128); - break; - case DEV_SD_MAJOR: - __small_sprintf (win32_path, dev.fmt, dev.minor / 16, dev.minor % 16); - break; - default: - __small_sprintf (win32_path, dev.fmt, dev.minor); - } - return true; + strcpy (win32_path, dev.native); + return dev.devn != FH_FS; } /* Normalize a Win32 path. -- cgit v1.2.3