From 5c770c843135040655925283c55c9163cd2c1052 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 28 Sep 2003 09:44:13 +0000 Subject: * devices.h: Move a few device major numbers. Fix typo of FH_UDP. * device.shilka: Remove /dev/hd device entries, rename all device_hd* to device_sd*. (device::parse): Disallow units outside lower and upper bounds. * dtable.cc (build_fh_pc): Fix typo of FH_UDP. * path.cc (win32_device_name): Fix win32 name creation to match new device handling. --- winsup/cygwin/path.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'winsup/cygwin/path.cc') diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 241660885..92fb00d9f 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -903,17 +903,19 @@ win32_device_name (const char *src_path, char *win32_path, device& dev) if (dev.devn == FH_FS) return false; - switch (dev.devn) + switch (dev.major) { - case FH_TAPE: + case DEV_TAPE_MAJOR: __small_sprintf (win32_path, dev.fmt, dev.minor % 128); break; - case FH_RAWDRIVE: - __small_sprintf (win32_path, dev.fmt, dev.minor - 224 + 'A'); + case DEV_RAWDRIVE_MAJOR: + __small_sprintf (win32_path, dev.fmt, dev.minor + 'A'); + 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); - break; } return true; } -- cgit v1.2.3