summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-10-01 12:36:39 +0000
committerChristopher Faylor <me@cgf.cx>2003-10-01 12:36:39 +0000
commit0e1ba88882c97c5ab78fb000af5d59f8b1842776 (patch)
tree6bade2e95dd111a05cff703d9cef9dd95acbaa1e /winsup/cygwin/path.cc
parent883c5345d4a806fbea7c7a01ef3e9548874de85b (diff)
downloadcygnal-0e1ba88882c97c5ab78fb000af5d59f8b1842776.tar.gz
cygnal-0e1ba88882c97c5ab78fb000af5d59f8b1842776.tar.bz2
cygnal-0e1ba88882c97c5ab78fb000af5d59f8b1842776.zip
* 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.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc18
1 files changed, 2 insertions, 16 deletions
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.