From 3cf6936e3bace15bdac5654688ea08c110774aa3 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 5 Oct 2001 18:23:49 +0000 Subject: [PATCH] * path.cc (get_raw_device_number): Correct length arguments for wdeveqn. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/path.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 1bad769da..c0343ac59 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 5 14:22:47 2001 Christopher Faylor + + * path.cc (get_raw_device_number): Correct length arguments for + wdeveqn. + Fri Oct 5 11:05:32 2001 Christopher Faylor * path.cc (getcwd): Allow NULL first argument. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 25d086fbf..1688f086e 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -849,7 +849,7 @@ get_raw_device_number (const char *unix_path, const char *w32_path, int &unit) { int devn; w32_path += 4; - if (wdeveqn ("tape", 8)) + if (wdeveqn ("tape", 4)) { unit = digits (w32_path + 4); // norewind tape devices have leading n in name @@ -862,7 +862,7 @@ get_raw_device_number (const char *unix_path, const char *w32_path, int &unit) unit = cyg_tolower (w32_path[0]) - 'a'; devn = FH_FLOPPY; } - else if (wdeveqn ("physicaldrive", 17)) + else if (wdeveqn ("physicaldrive", 13)) { unit = digits (w32_path + 13) + 128; devn = FH_FLOPPY;