156{
163
164 VFDTRACE(0, (
"[VFD] VfdFormatTrack - IN\n"));
165
167
168 geometry = DeviceExtension->Geometry;
169
170 if (!geometry) {
172 }
173
175
178
179 if (format_buffer ==
NULL) {
180 VFDTRACE(0, (
"[VFD] cannot allocate a format buffer\n"));
182 }
183
185
188 FormatParams->StartHeadNumber * track_length;
189
192 FormatParams->EndHeadNumber * track_length;
193
194 do {
195 if (DeviceExtension->FileHandle) {
197
199 DeviceExtension->FileHandle,
204 format_buffer,
205 track_length,
206 &start_offset,
208
210 VFDTRACE(0, (
"[VFD] ZwWriteFile - %s\n",
212 break;
213 }
214 }
215 else {
217 DeviceExtension->FileBuffer + start_offset.
QuadPart,
218 format_buffer,
219 track_length);
220
222 }
223
224 start_offset.
QuadPart += track_length;
225 }
227
229
230 VFDTRACE(0, (
"[VFD] VfdFormatTrack - OUT\n"));
231
233}
#define NT_SUCCESS(StatCode)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define RtlFillMemory(Dest, Length, Fill)
static HANDLE PIO_APC_ROUTINE void PIO_STATUS_BLOCK io_status
#define RtlMoveMemory(Destination, Source, Length)
#define STATUS_INSUFFICIENT_RESOURCES
#define VFDTRACE(LEVEL, STRING)
#define VFD_FORMAT_FILL_DATA