Uwe Bonnes wrote:

> Hallo,
>
> appended patch makes SendASPI32Command:SC_GET_DEV_TYPE return more
> sensible values.
>
> Changelog:
>         dlls/winaspi/winaspi32.c: SendASPI32Command
>         Sensible return values for SC_GET_DEV_TYPE
>
> Bye
>
> Uwe Bonnes                [EMAIL PROTECTED]
>
> Free Software: If you contribute nothing, expect nothing
> --
>

hahhaah.. I didn't even look at my own damn FIXME...  That is one way of doing it.  
Another is to
simply check the return value of that function, I just pretty much copied the existing 
code and threw
the fixme at the top as a reminder to get to it, and then never got to it!

I noticed you wanted to know if there was an include file to put stuff in.  Usually 
the appropriate
file is "scsidefs.h" Which while not being a "standard" header, almost every ASPI 
program has a copy of
it, so we should probably make our own version of it.  I would suggest taking an 
existing version and
cleaning up all the C++ comments it is littered with; everything else in the file is 
just "#define
SOME_THING 0xXX".

Haven't tried this patch, but I bet it would fix my scanner program and maybe the 
other CD-R programs.

-Dave

>
> gauss:~/tmp/wine/compile> cvs diff -u wine/dlls/winaspi/winaspi32.c
> Index: wine/dlls/winaspi/winaspi32.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/winaspi/winaspi32.c,v
> retrieving revision 1.2
> diff -u -r1.2 winaspi32.c
> --- wine/dlls/winaspi/winaspi32.c       2000/03/09 18:44:02     1.2
> +++ wine/dlls/winaspi/winaspi32.c       2000/03/25 18:17:19
> @@ -419,7 +419,6 @@
>      FIXME("ASPI: Partially implemented SC_HA_INQUIRY for adapter %d.\n", 
>lpSRB->inquiry.SRB_HaId);
>      return SS_COMP;
>    case SC_GET_DEV_TYPE: {
> -    /* FIXME: We should return SS_NO_DEVICE if the device is not configured */
>      /* FIXME: We should return SS_INVALID_HA if HostAdapter!=0 */
>      SRB                tmpsrb;
>      char       inqbuf[200];
> @@ -436,12 +435,18 @@
>      tmpsrb.cmd.CDBByte[0]      = 0x12; /* INQUIRY  */
>      tmpsrb.cmd.CDBByte[4]      = sizeof(inqbuf);
>      tmpsrb.cmd.SRB_CDBLen      = 6;
> +    inqbuf[0]=0x7f;
>      ASPI_ExecScsiCmd(&tmpsrb.cmd);
>  #define X(x) lpSRB->devtype.SRB_##x = tmpsrb.cmd.SRB_##x
>      X(Status);
>  #undef X
>      lpSRB->devtype.SRB_DeviceType = inqbuf[0]&0x1f;
>      TRACE("returning devicetype %d for target 
>%d\n",inqbuf[0]&0x1f,tmpsrb.cmd.SRB_Target);
> +    if (lpSRB->devtype.SRB_DeviceType == 0x1f /* FIXME bon 000325: This is 
>DTYPE_UNKNOWN
> +                                              Should we have some Include file for 
>these values?*/)
> +      return SS_NO_DEVICE;
> +    else
> +      return SS_COMP;
>      break;
>    }
>    case SC_EXEC_SCSI_CMD:

Reply via email to