Mail Archives: cygwin-developers/1998/09/04/13:36:09
Sergey Okhapkin wrote:
>
> Did you try to write a multi-volume tar floppies? That didn't work before.
>
No, I haven't tested this 'til today.
It doesn't work, because WinNT returns ERROR_INVALID_PARAMETER,
if you read over the last block of a raw device. Gaga, isn't it?
I have tested it on tape device, and, as expected, it doesn't
operate, too :-( First, fhandler_dev_tape has it's own methods
`raw_read()' and `raw_write()' and second, the error codes
are not the same. This would be too simple, woudn't it, Bill?
I will work on a correct solution, including tapes, but for
today a first hack for raw devices such as floppies (not for
tapes!):
------- snip ---------
*** fhandler.cc.orig Fri Sep 04 21:58:18 1998
--- fhandler.cc Fri Sep 04 21:58:48 1998
*************** fhandler_base::raw_read (void *ptr, size
*** 176,181 ****
--- 176,186 ----
case ERROR_MORE_DATA:
/* `bytes_read' is supposedly valid. */
break;
+ case ERROR_INVALID_PARAMETER:
+ /* Temporary hack for raw devices. */
+ set_errno (ENOSPC);
+ return -1;
+ break;
default:
syscall_printf ("ReadFile %s failed with error %d\n",
unix_path_name_,
------- snip ---------
Bye,
Corinna
- Raw text -