-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.win32
83 lines (69 loc) · 3.95 KB
/
README.win32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
This port supports Windows NT, 2000, 2003++, XP, Vista and Windows 7
(i.e. not 95, 98, ME or earlier). It uses the Microsoft SCSI Pass Through
"Direct" (SPTD).
The source can be built in a cygwin environment and can run in a cygwin
bash shell. It can also run in a DOS shell if the cygwin1.dll is put in an
appropriate place.
Alternatively the source can be built with the MinGW compiler using its
MSYS shell. This removes the dependency on the cygwin1.dll file. The
ddpt executable built by the MinGW compiler can also be run in a DOS
(also known as the "Command prompt") shell.
In Windows 7 ddpt typically needs to be run with administrator permissions.
The device naming schemes attempt to follow what DOS does, with a few short
cuts. If volume "D:" is an ATAPI DVD drive then the actual file opened
is "\\.\D:". All device nodes of interest to ddpt have a leading "\\.\"
so if the user doesn't supply it, ddpt will. Thus 'ddpt if=d: bs=512 count=8'
should work. Note that volume names map to Windows partitions so there can be
multiple volume names per disk. SCSI devices (or those that use a SCSI
command set) can also be accessed via their "class" driver. These have names
like "PhysicalDrive<n>", "CDROM<n>" and "TAPE<n>" where <n> is a number
starting at 0. Since "PhysicalDrive" is tedious to type, a shortened
form of "PD" is accepted.
Finally there is a lower level "SCSI<n>:" interface that addresses a SCSI
adapter. The device needs further sub-addressing in the form of a bus
number (also called a PathId), a target identifier and a lun (logical
unit number). ddpt uses this notation: "SCSI<n>:<bus>,<target>,<lun>".
The trailing ",<lun>" may be omitted in which case a lun of 0 is assumed.
Once a device has been "claimed" by an upper level "class" driver the
OS will not allow it to be accessed via the "SCSI<n>:" interface. Hence
this is only needed for special devices (e.g. with processor or SES
peripheral device type) that are not claimed by the class drivers.
The Windows version of ddpt supports a '--wscan' (or '-w') option. It shows
the mapping between a class driver device name (e.g. PD1) and its
associated volume name(s). Here are some examples:
$ ddpt -w
PD0 [C] FUJITSU MHY2160BH 0000
PD1 [DF] WD 2500BEV External 1.05 WD-WXE90
CDROM0 [E] MATSHITA DVD/CDRW UJDA775 CB03
Now request bus types as well.
$ ddpt -ww
PD0 [C] <Ata > FUJITSU MHY2160BH 0000
PD1 [DF] <Usb > WD 2500BEV External 1.05 WD-WXE90
CDROM0 [E] <Atapi> MATSHITA DVD/CDRW UJDA775 CB03
Now request a SCSI adapter scan as well.
$ ddpt -www
PD0 [C] <Ata > FUJITSU MHY2160BH 0000
PD1 [DF] <Usb > WD 2500BEV External 1.05 WD-WXE90
CDROM0 [E] <Atapi> MATSHITA DVD/CDRW UJDA775 CB03
SCSI0:0,0,0 claimed=1 pdt=0h FUJITSU MHY2160BH 0000
SCSI1:0,0,0 claimed=1 pdt=5h MATSHITA DVD/CDRW UJDA775 CB03
And finally here is a more interesting example showing disks with no
Windows (2000) volumes, a tape drive and a weird unclaimed SCSI
pseudo device with BCC (Bridge Controller Commands) peripheral device
type.
$ ddpt -www
PD0 [C] <Ata > ST380011A 8.01
PD1 <Scsi > SEAGATE ST373455SS 2189
PD2 <Scsi > ATA ST3160812AS D
PD3 <Scsi > SEAGATE ST336754SS 0003
CDROM0 [F] <Atapi> HL-DT-ST DVDRAM GSA-4163B A103
TAPE0 <Scsi > SONY SDT-7000 0192
SCSI0:0,0,0 claimed=1 pdt=0h dubious ST380011 A 8.01
SCSI1:0,0,0 claimed=1 pdt=5h HL-DT-ST DVDRAM GSA-4163B A103
SCSI2:0,6,0 claimed=1 pdt=1h SONY SDT-7000 0192
SCSI5:0,17,0 claimed=1 pdt=0h SEAGATE ST373455SS 2189
SCSI5:0,19,0 claimed=1 pdt=0h ATA ST3160812AS D
SCSI5:0,21,0 claimed=1 pdt=0h SEAGATE ST336754SS 0003
SCSI5:0,112,0 claimed=0 pdt=10h LSI PSEUDO DEVICE 2.34
Douglas Gilbert
17th February 2011