summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorCástor Muñoz <cmvidal@gmail.com>2017-05-06 02:35:57 +0200
committerCástor Muñoz <cmvidal@gmail.com>2017-06-19 02:00:30 +0200
commitcf168d4636b81e414f11ef2c69b1430302d33c3b (patch)
tree69887c9041f62eb676c77207b92135017a821a0c /rbutil
parent37a945d203873a7c4e49ce5506385e82c0001d0b (diff)
downloadrockbox-cf168d4636b81e414f11ef2c69b1430302d33c3b.tar.gz
rockbox-cf168d4636b81e414f11ef2c69b1430302d33c3b.tar.bz2
rockbox-cf168d4636b81e414f11ef2c69b1430302d33c3b.zip
ipodpatcher: remove external ddk/ntddscsi.h dependency
Change-Id: Ib614f4181fe29ef04fcf64f90e37edc3a064270a
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/ipodpatcher/ipodio-win32-scsi.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/rbutil/ipodpatcher/ipodio-win32-scsi.c b/rbutil/ipodpatcher/ipodio-win32-scsi.c
index 7e338acbc0..16460cfba3 100644
--- a/rbutil/ipodpatcher/ipodio-win32-scsi.c
+++ b/rbutil/ipodpatcher/ipodio-win32-scsi.c
@@ -53,10 +53,33 @@
#include <windows.h>
#include <stddef.h>
#include <stdio.h>
-#include <ddk/ntddscsi.h>
#include "ipodio.h"
+/* from ddk/ntddscsi.h */
+#define SCSI_IOCTL_DATA_OUT 0
+#define SCSI_IOCTL_DATA_IN 1
+#define SCSI_IOCTL_DATA_UNSPECIFIED 2
+
+#define IOCTL_SCSI_PASS_THROUGH \
+ CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
+
+typedef struct _SCSI_PASS_THROUGH {
+ USHORT Length;
+ UCHAR ScsiStatus;
+ UCHAR PathId;
+ UCHAR TargetId;
+ UCHAR Lun;
+ UCHAR CdbLength;
+ UCHAR SenseInfoLength;
+ UCHAR DataIn;
+ ULONG DataTransferLength;
+ ULONG TimeOutValue;
+ ULONG_PTR DataBufferOffset;
+ ULONG SenseInfoOffset;
+ UCHAR Cdb[16];
+} SCSI_PASS_THROUGH, *PSCSI_PASS_THROUGH;
+
typedef struct _SCSI_PASS_THROUGH_WITH_BUFFERS {
SCSI_PASS_THROUGH Spt;
ULONG Filler; /* realign buffers to double word boundary */