* path.cc (get_raw_device_number): Correct length arguments for wdeveqn.

This commit is contained in:
Christopher Faylor 2001-10-05 18:23:49 +00:00
parent 547d07cae8
commit 3cf6936e3b
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Fri Oct 5 14:22:47 2001 Christopher Faylor <cgf@cygnus.com>
* path.cc (get_raw_device_number): Correct length arguments for
wdeveqn.
Fri Oct 5 11:05:32 2001 Christopher Faylor <cgf@cygnus.com> Fri Oct 5 11:05:32 2001 Christopher Faylor <cgf@cygnus.com>
* path.cc (getcwd): Allow NULL first argument. * path.cc (getcwd): Allow NULL first argument.

View File

@ -849,7 +849,7 @@ get_raw_device_number (const char *unix_path, const char *w32_path, int &unit)
{ {
int devn; int devn;
w32_path += 4; w32_path += 4;
if (wdeveqn ("tape", 8)) if (wdeveqn ("tape", 4))
{ {
unit = digits (w32_path + 4); unit = digits (w32_path + 4);
// norewind tape devices have leading n in name // 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'; unit = cyg_tolower (w32_path[0]) - 'a';
devn = FH_FLOPPY; devn = FH_FLOPPY;
} }
else if (wdeveqn ("physicaldrive", 17)) else if (wdeveqn ("physicaldrive", 13))
{ {
unit = digits (w32_path + 13) + 128; unit = digits (w32_path + 13) + 128;
devn = FH_FLOPPY; devn = FH_FLOPPY;