8 #include <devices/newstyle.h>
9 #include <proto/exec.h>
11 BOOL
checkfor64bitcommandset(struct IOStdReq
*io
)
13 // struct IOStdReq io = { };
15 struct NSDeviceQueryResult nsdqr
; // +jmc+ { } ??;
16 LONG error
; // +jmc+ = 0
17 // BOOL newstyle = FALSE;
18 BOOL does64bit
= FALSE
;
22 nsdqr
.SizeAvailable
= 0;
23 nsdqr
.DevQueryFormat
= 0;
25 io
->io_Command
= NSCMD_DEVICEQUERY
;
26 io
->io_Length
= sizeof(nsdqr
);
27 io
->io_Data
= (APTR
)&nsdqr
;
28 error
= DoIO((struct IORequest
*)io
);
29 if ((!error
) && (io
->io_Actual
>= 16) &&
30 (nsdqr
.SizeAvailable
== io
->io_Actual
) &&
31 (nsdqr
.DeviceType
== NSDEVTYPE_TRACKDISK
))
33 // Ok, this must be a new style trackdisk device
36 // Is it safe to use 64 bits with this driver? We can reject
37 // bad mounts pretty easily via this check!
39 for(cmdcheck
= nsdqr
.SupportedCommands
; *cmdcheck
; cmdcheck
++)
40 if(*cmdcheck
== NSCMD_TD_READ64
)
42 // This trackdisk style device supports the complete
43 // 64 bit command set without returning IOERR_NOCMD!