59{
60 if (!Duid1 || !Duid2)
61 {
63 }
64
67 {
69 }
70
72 {
74 }
75
76 if (Duid1->StorageDeviceIdOffset == 0 && Duid1->StorageDeviceOffset == 0 &&
77 Duid1->DriveLayoutSignatureOffset == 0)
78 {
80 }
81
82 if (Duid2->StorageDeviceIdOffset == 0 && Duid2->StorageDeviceOffset == 0 &&
83 Duid2->DriveLayoutSignatureOffset == 0)
84 {
86 }
87
88 if (Duid1->Size == Duid2->Size)
89 {
90 if (
memcmp(Duid1, Duid2, Duid1->Size) == 0)
91 {
93 }
94 }
95
96 if (Duid1->StorageDeviceIdOffset && Duid2->StorageDeviceIdOffset)
97 {
100
103
106
109
112 {
114 }
115
116 if (idDesc1->Size == idDesc2->Size)
117 {
118 if (
memcmp(idDesc1, idDesc2, idDesc1->Size) == 0)
119 {
121 }
122 }
123
125
126 for (idx1 = 0; idx1 < idDesc1->NumberOfIdentifiers; idx1++)
127 {
133 {
135
136 for (idx2 = 0; idx2 < idDesc2->NumberOfIdentifiers; idx2++)
137 {
142 {
144 }
145
147 }
148 }
149
151 }
152 }
153
154 if (Duid1->StorageDeviceOffset && Duid2->StorageDeviceOffset)
155 {
158
161
164 {
166 }
167
168 if (desc1->Size == desc2->Size)
169 {
170 if (
memcmp(desc1, desc2, desc1->Size) == 0)
171 {
173 }
174 }
175
176 if (desc1->SerialNumberOffset && desc2->SerialNumberOffset)
177 {
180
181 string1 = (
const char *)((
PUCHAR)desc1 + desc1->SerialNumberOffset);
182 string2 = (
const char *)((
PUCHAR)desc2 + desc2->SerialNumberOffset);
183
185 {
186 if (desc1->VendorIdOffset && desc2->VendorIdOffset)
187 {
188 string1 = (
const char *)((
PUCHAR)desc1 + desc1->VendorIdOffset);
189 string2 = (
const char *)((
PUCHAR)desc2 + desc2->VendorIdOffset);
190
192 {
194 }
195 }
196
197 if (desc1->ProductIdOffset && desc2->ProductIdOffset)
198 {
199 string1 = (
const char *)((
PUCHAR)desc1 + desc1->ProductIdOffset);
200 string2 = (
const char *)((
PUCHAR)desc2 + desc2->ProductIdOffset);
201
203 {
205 }
206 }
207
209 }
210 }
211 }
212
213 if (Duid1->DriveLayoutSignatureOffset && Duid2->DriveLayoutSignatureOffset)
214 {
217
220
222 {
224 }
225
228 {
230 }
231
233 {
235 }
236 }
237
239}
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static CHAR string1[MAX_PATH]
static CHAR string2[MAX_PATH]
struct _STORAGE_IDENTIFIER * PSTORAGE_IDENTIFIER
* PSTORAGE_DEVICE_DESCRIPTOR
STORAGE_DEVICE_DESCRIPTOR
STORAGE_DEVICE_ID_DESCRIPTOR
@ StorageIdTypeScsiNameString
* PSTORAGE_DEVICE_ID_DESCRIPTOR
struct _STORAGE_DEVICE_LAYOUT_SIGNATURE STORAGE_DEVICE_LAYOUT_SIGNATURE
struct _STORAGE_DEVICE_LAYOUT_SIGNATURE * PSTORAGE_DEVICE_LAYOUT_SIGNATURE
STORAGE_IDENTIFIER_CODE_SET CodeSet
STORAGE_ASSOCIATION_TYPE Association
STORAGE_IDENTIFIER_TYPE Type