Re: TAPE 5/5: add implementation of kernel tape functions #2

2006-01-26 Thread Hans Leidekker
On Thursday 26 January 2006 20:37, Robert Shearman wrote: > You're duplicating RtlNtStatusToDosError. Not completely. STATUS_DISK_FULL (translated from ENOSPC) for example is mapped to ERROR_DISK_FULL by RtlNtStatusToDosError whereas I am mapping it to ERROR_END_OF_MEDIA which I think is more app

Re: TAPE 5/5: add implementation of kernel tape functions #2

2006-01-26 Thread Alexandre Julliard
Hans Leidekker <[EMAIL PROTECTED]> writes: > Not completely. STATUS_DISK_FULL (translated from ENOSPC) for > example is mapped to ERROR_DISK_FULL by RtlNtStatusToDosError > whereas I am mapping it to ERROR_END_OF_MEDIA which I think is > more appropriate in the context of tapes. Then the ntdll co

Re: TAPE 5/5: add implementation of kernel tape functions #2

2006-01-26 Thread Robert Shearman
Hans Leidekker wrote: +static DWORD set_error_from_status( NTSTATUS status ) +{ +DWORD error; + +switch (status) +{ +case STATUS_SUCCESS:error = ERROR_SUCCESS; break; +case STATUS_DISK_FULL: error = ERROR_END_OF_MEDIA; break; +case STATUS_DEVICE_NOT_R

Re: TAPE 5/5: add implementation of kernel tape functions

2006-01-26 Thread Alexandre Julliard
Hans Leidekker <[EMAIL PROTECTED]> writes: > +status = NtDeviceIoControlFile( device, NULL, NULL, NULL, &io, > +IOCTL_TAPE_CREATE_PARTITION, &part, sizeof(TAPE_CREATE_PARTITION), > NULL, 0 ); > > - return FALSE; > +return (DWORD)status; > } All these functions should return W