3 * Copyright (C) 2002, 2004 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 * COPYRIGHT: See COPYING in the top level directory
22 * PROJECT: ReactOS kernel
23 * FILE: services/fs/cdfs/dirctl.c
24 * PURPOSE: CDROM (ISO 9660) filesystem driver
25 * PROGRAMMER: Art Yerkes
30 /* INCLUDES *****************************************************************/
37 /* FUNCTIONS ****************************************************************/
39 #define ROUND_DOWN(N, S) (((N) / (S)) * (S))
40 #define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
42 /* FUNCTIONS ****************************************************************/
45 * FUNCTION: Retrieves the file name, be it in short or long file name format
48 CdfsGetEntryName(PDEVICE_EXTENSION DeviceExt
,
51 PLARGE_INTEGER StreamOffset
,
58 PDIR_RECORD Record
= *Ptr
;
61 if (*CurrentOffset
>= DirLength
)
62 return(STATUS_NO_MORE_ENTRIES
);
64 if (*CurrentOffset
== 0)
67 Record
= (PDIR_RECORD
)*Block
;
68 while (Index
< *pIndex
)
70 (*Ptr
) = (PVOID
)((ULONG_PTR
)(*Ptr
) + Record
->RecordLength
);
71 (*CurrentOffset
) += Record
->RecordLength
;
73 if ((ULONG_PTR
)(*Ptr
) - (ULONG_PTR
)(*Block
) >= BLOCKSIZE
|| Record
->RecordLength
== 0)
75 DPRINT("Map next sector\n");
76 CcUnpinData(*Context
);
77 StreamOffset
->QuadPart
+= BLOCKSIZE
;
78 *CurrentOffset
= ROUND_UP(*CurrentOffset
, BLOCKSIZE
);
79 if (!CcMapData(DeviceExt
->StreamFileObject
,
84 DPRINT("CcMapData() failed\n");
85 return(STATUS_UNSUCCESSFUL
);
88 Record
= (PDIR_RECORD
)*Ptr
;
90 if (*CurrentOffset
>= DirLength
)
91 return(STATUS_NO_MORE_ENTRIES
);
97 if ((ULONG_PTR
)(*Ptr
) - (ULONG_PTR
)(*Block
) >= BLOCKSIZE
|| Record
->RecordLength
== 0)
99 DPRINT("Map next sector\n");
100 CcUnpinData(*Context
);
101 StreamOffset
->QuadPart
+= BLOCKSIZE
;
102 *CurrentOffset
= ROUND_UP(*CurrentOffset
, BLOCKSIZE
);
103 if (!CcMapData(DeviceExt
->StreamFileObject
,
108 DPRINT("CcMapData() failed\n");
109 return(STATUS_UNSUCCESSFUL
);
112 Record
= (PDIR_RECORD
)*Ptr
;
115 if (*CurrentOffset
>= DirLength
)
116 return STATUS_NO_MORE_ENTRIES
;
118 DPRINT("Index %lu RecordLength %lu Offset %lu\n",
119 *pIndex
, Record
->RecordLength
, *CurrentOffset
);
121 if (Record
->FileIdLength
== 1 && Record
->FileId
[0] == 0)
125 else if (Record
->FileIdLength
== 1 && Record
->FileId
[0] == 1)
131 if (DeviceExt
->CdInfo
.JolietLevel
== 0)
135 for (i
= 0; i
< Record
->FileIdLength
&& Record
->FileId
[i
] != ';'; i
++)
136 Name
[i
] = (WCHAR
)Record
->FileId
[i
];
141 CdfsSwapString(Name
, Record
->FileId
, Record
->FileIdLength
);
145 DPRINT("Name '%S'\n", Name
);
149 return(STATUS_SUCCESS
);
154 * FUNCTION: Find a file
157 CdfsFindFile(PDEVICE_EXTENSION DeviceExt
,
160 PUNICODE_STRING FileToFind
,
165 WCHAR ShortNameBuffer
[13];
166 UNICODE_STRING TempString
;
167 UNICODE_STRING ShortName
;
168 UNICODE_STRING LongName
;
169 UNICODE_STRING FileToFindUpcase
;
176 PVOID Context
= NULL
;
179 LARGE_INTEGER StreamOffset
, OffsetOfEntry
;
181 DPRINT("FindFile(Parent %x, FileToFind '%wZ', DirIndex: %d)\n",
182 Parent
, FileToFind
, pDirIndex
? *pDirIndex
: 0);
183 DPRINT("FindFile: old Pathname %x, old Objectname %x)\n",
184 Fcb
->PathName
, Fcb
->ObjectName
);
189 if (FileToFind
== NULL
|| FileToFind
->Length
== 0)
191 RtlInitUnicodeString(&TempString
, L
".");
192 FileToFind
= &TempString
;
197 if (Parent
->Entry
.ExtentLocationL
== DeviceExt
->CdInfo
.RootStart
)
209 StreamOffset
.QuadPart
= (LONGLONG
)DeviceExt
->CdInfo
.RootStart
* (LONGLONG
)BLOCKSIZE
;
210 DirSize
= DeviceExt
->CdInfo
.RootSize
;
213 if (FileToFind
->Buffer
[0] == 0 ||
214 (FileToFind
->Buffer
[0] == '\\' && FileToFind
->Buffer
[1] == 0) ||
215 (FileToFind
->Buffer
[0] == '.' && FileToFind
->Buffer
[1] == 0))
217 /* it's root : complete essentials fields then return ok */
218 RtlZeroMemory(Fcb
, sizeof(FCB
));
220 Fcb
->PathName
[0] = '\\';
221 Fcb
->ObjectName
= &Fcb
->PathName
[1];
222 Fcb
->Entry
.ExtentLocationL
= DeviceExt
->CdInfo
.RootStart
;
223 Fcb
->Entry
.DataLengthL
= DeviceExt
->CdInfo
.RootSize
;
224 Fcb
->Entry
.FileFlags
= 0x02; //FILE_ATTRIBUTE_DIRECTORY;
230 DPRINT("CdfsFindFile: new Pathname %S, new Objectname %S)\n",Fcb
->PathName
, Fcb
->ObjectName
);
231 return STATUS_SUCCESS
;
236 StreamOffset
.QuadPart
= (LONGLONG
)Parent
->Entry
.ExtentLocationL
* (LONGLONG
)BLOCKSIZE
;
237 DirSize
= Parent
->Entry
.DataLengthL
;
240 DPRINT("StreamOffset %I64u DirSize %lu\n", StreamOffset
.QuadPart
, DirSize
);
242 if (pDirIndex
&& (*pDirIndex
))
243 DirIndex
= *pDirIndex
;
245 if (pOffset
&& (*pOffset
))
248 StreamOffset
.QuadPart
+= ROUND_DOWN(Offset
, BLOCKSIZE
);
251 if (!CcMapData(DeviceExt
->StreamFileObject
, &StreamOffset
,
252 BLOCKSIZE
, TRUE
, &Context
, &Block
))
254 DPRINT("CcMapData() failed\n");
255 return STATUS_UNSUCCESSFUL
;
258 Record
= (PDIR_RECORD
) ((ULONG_PTR
)Block
+ Offset
% BLOCKSIZE
);
261 Offset
+= Record
->RecordLength
;
262 Record
= (PDIR_RECORD
)((ULONG_PTR
)Record
+ Record
->RecordLength
);
265 /* Upper case the expression for FsRtlIsNameInExpression */
266 Status
= RtlUpcaseUnicodeString(&FileToFindUpcase
, FileToFind
, TRUE
);
267 if (!NT_SUCCESS(Status
))
274 DPRINT("RecordLength %u ExtAttrRecordLength %u NameLength %u\n",
275 Record
->RecordLength
, Record
->ExtAttrRecordLength
, Record
->FileIdLength
);
277 Status
= CdfsGetEntryName
278 (DeviceExt
, &Context
, &Block
, &StreamOffset
,
279 DirSize
, (PVOID
*)&Record
, name
, &DirIndex
, &Offset
);
281 if (Status
== STATUS_NO_MORE_ENTRIES
)
285 else if (Status
== STATUS_UNSUCCESSFUL
)
287 /* Note: the directory cache has already been unpinned */
288 RtlFreeUnicodeString(&FileToFindUpcase
);
292 DPRINT("Name '%S'\n", name
);
294 RtlInitUnicodeString(&LongName
, name
);
295 ShortName
.Length
= 0;
296 ShortName
.MaximumLength
= 26;
297 ShortName
.Buffer
= ShortNameBuffer
;
299 OffsetOfEntry
.QuadPart
= StreamOffset
.QuadPart
+ Offset
;
300 CdfsShortNameCacheGet(Parent
, &OffsetOfEntry
, &LongName
, &ShortName
);
302 DPRINT("ShortName '%wZ'\n", &ShortName
);
304 if (FsRtlIsNameInExpression(&FileToFindUpcase
, &LongName
, TRUE
, NULL
) ||
305 FsRtlIsNameInExpression(&FileToFindUpcase
, &ShortName
, TRUE
, NULL
))
307 if (Parent
&& Parent
->PathName
)
309 len
= wcslen(Parent
->PathName
);
310 memcpy(Fcb
->PathName
, Parent
->PathName
, len
*sizeof(WCHAR
));
311 Fcb
->ObjectName
=&Fcb
->PathName
[len
];
312 if (len
!= 1 || Fcb
->PathName
[0] != '\\')
314 Fcb
->ObjectName
[0] = '\\';
315 Fcb
->ObjectName
= &Fcb
->ObjectName
[1];
320 Fcb
->ObjectName
=Fcb
->PathName
;
321 Fcb
->ObjectName
[0]='\\';
322 Fcb
->ObjectName
=&Fcb
->ObjectName
[1];
325 DPRINT("PathName '%S' ObjectName '%S'\n", Fcb
->PathName
, Fcb
->ObjectName
);
327 memcpy(&Fcb
->Entry
, Record
, sizeof(DIR_RECORD
));
328 wcsncpy(Fcb
->ObjectName
, name
, MAX_PATH
);
330 /* Copy short name */
331 Fcb
->ShortNameU
.Length
= ShortName
.Length
;
332 Fcb
->ShortNameU
.MaximumLength
= ShortName
.Length
;
333 Fcb
->ShortNameU
.Buffer
= Fcb
->ShortNameBuffer
;
334 memcpy(Fcb
->ShortNameBuffer
, ShortName
.Buffer
, ShortName
.Length
);
337 *pDirIndex
= DirIndex
;
341 DPRINT("FindFile: new Pathname %S, new Objectname %S, DirIndex %d\n",
342 Fcb
->PathName
, Fcb
->ObjectName
, DirIndex
);
344 RtlFreeUnicodeString(&FileToFindUpcase
);
345 CcUnpinData(Context
);
347 return STATUS_SUCCESS
;
350 Offset
+= Record
->RecordLength
;
351 Record
= (PDIR_RECORD
)((ULONG_PTR
)Record
+ Record
->RecordLength
);
355 RtlFreeUnicodeString(&FileToFindUpcase
);
356 CcUnpinData(Context
);
359 *pDirIndex
= DirIndex
;
364 return STATUS_UNSUCCESSFUL
;
369 CdfsGetNameInformation(PFCB Fcb
,
370 PDEVICE_EXTENSION DeviceExt
,
371 PFILE_NAMES_INFORMATION Info
,
376 DPRINT("CdfsGetNameInformation() called\n");
378 Length
= wcslen(Fcb
->ObjectName
) * sizeof(WCHAR
);
379 if ((sizeof(FILE_NAMES_INFORMATION
) + Length
) > BufferLength
)
380 return(STATUS_BUFFER_OVERFLOW
);
382 Info
->FileNameLength
= Length
;
383 Info
->NextEntryOffset
=
384 ROUND_UP(sizeof(FILE_NAMES_INFORMATION
) + Length
, sizeof(ULONG
));
385 RtlCopyMemory(Info
->FileName
, Fcb
->ObjectName
, Length
);
389 return(STATUS_SUCCESS
);
394 CdfsGetDirectoryInformation(PFCB Fcb
,
395 PDEVICE_EXTENSION DeviceExt
,
396 PFILE_DIRECTORY_INFORMATION Info
,
401 DPRINT("CdfsGetDirectoryInformation() called\n");
403 Length
= wcslen(Fcb
->ObjectName
) * sizeof(WCHAR
);
404 if ((sizeof (FILE_DIRECTORY_INFORMATION
) + Length
) > BufferLength
)
405 return(STATUS_BUFFER_OVERFLOW
);
407 Info
->FileNameLength
= Length
;
408 Info
->NextEntryOffset
=
409 ROUND_UP(sizeof(FILE_DIRECTORY_INFORMATION
) + Length
, sizeof(ULONG
));
410 RtlCopyMemory(Info
->FileName
, Fcb
->ObjectName
, Length
);
412 /* Convert file times */
413 CdfsDateTimeToSystemTime(Fcb
,
414 &Info
->CreationTime
);
415 Info
->LastWriteTime
= Info
->CreationTime
;
416 Info
->ChangeTime
= Info
->CreationTime
;
418 /* Convert file flags */
419 CdfsFileFlagsToAttributes(Fcb
,
420 &Info
->FileAttributes
);
421 if (CdfsFCBIsDirectory(Fcb
))
423 Info
->EndOfFile
.QuadPart
= 0;
424 Info
->AllocationSize
.QuadPart
= 0;
428 Info
->EndOfFile
.QuadPart
= Fcb
->Entry
.DataLengthL
;
430 /* Make AllocSize a rounded up multiple of the sector size */
431 Info
->AllocationSize
.QuadPart
= ROUND_UP(Fcb
->Entry
.DataLengthL
, BLOCKSIZE
);
436 return(STATUS_SUCCESS
);
441 CdfsGetFullDirectoryInformation(PFCB Fcb
,
442 PDEVICE_EXTENSION DeviceExt
,
443 PFILE_FULL_DIR_INFORMATION Info
,
448 DPRINT("CdfsGetFullDirectoryInformation() called\n");
450 Length
= wcslen(Fcb
->ObjectName
) * sizeof(WCHAR
);
451 if ((sizeof (FILE_FULL_DIR_INFORMATION
) + Length
) > BufferLength
)
452 return(STATUS_BUFFER_OVERFLOW
);
454 Info
->FileNameLength
= Length
;
455 Info
->NextEntryOffset
=
456 ROUND_UP(sizeof(FILE_FULL_DIR_INFORMATION
) + Length
, sizeof(ULONG
));
457 RtlCopyMemory(Info
->FileName
, Fcb
->ObjectName
, Length
);
459 /* Convert file times */
460 CdfsDateTimeToSystemTime(Fcb
,
461 &Info
->CreationTime
);
462 Info
->LastWriteTime
= Info
->CreationTime
;
463 Info
->ChangeTime
= Info
->CreationTime
;
465 /* Convert file flags */
466 CdfsFileFlagsToAttributes(Fcb
,
467 &Info
->FileAttributes
);
469 if (CdfsFCBIsDirectory(Fcb
))
471 Info
->EndOfFile
.QuadPart
= 0;
472 Info
->AllocationSize
.QuadPart
= 0;
476 Info
->EndOfFile
.QuadPart
= Fcb
->Entry
.DataLengthL
;
478 /* Make AllocSize a rounded up multiple of the sector size */
479 Info
->AllocationSize
.QuadPart
= ROUND_UP(Fcb
->Entry
.DataLengthL
, BLOCKSIZE
);
485 return(STATUS_SUCCESS
);
490 CdfsGetBothDirectoryInformation(PFCB Fcb
,
491 PDEVICE_EXTENSION DeviceExt
,
492 PFILE_BOTH_DIR_INFORMATION Info
,
497 DPRINT("CdfsGetBothDirectoryInformation() called\n");
499 Length
= wcslen(Fcb
->ObjectName
) * sizeof(WCHAR
);
500 if ((sizeof (FILE_BOTH_DIR_INFORMATION
) + Length
) > BufferLength
)
501 return(STATUS_BUFFER_OVERFLOW
);
503 Info
->FileNameLength
= Length
;
504 Info
->NextEntryOffset
=
505 ROUND_UP(sizeof(FILE_BOTH_DIR_INFORMATION
) + Length
, sizeof(ULONG
));
506 RtlCopyMemory(Info
->FileName
, Fcb
->ObjectName
, Length
);
508 /* Convert file times */
509 CdfsDateTimeToSystemTime(Fcb
,
510 &Info
->CreationTime
);
511 Info
->LastWriteTime
= Info
->CreationTime
;
512 Info
->ChangeTime
= Info
->CreationTime
;
514 /* Convert file flags */
515 CdfsFileFlagsToAttributes(Fcb
,
516 &Info
->FileAttributes
);
518 if (CdfsFCBIsDirectory(Fcb
))
520 Info
->EndOfFile
.QuadPart
= 0;
521 Info
->AllocationSize
.QuadPart
= 0;
525 Info
->EndOfFile
.QuadPart
= Fcb
->Entry
.DataLengthL
;
527 /* Make AllocSize a rounded up multiple of the sector size */
528 Info
->AllocationSize
.QuadPart
= ROUND_UP(Fcb
->Entry
.DataLengthL
, BLOCKSIZE
);
534 /* Copy short name */
535 ASSERT(Fcb
->ShortNameU
.Length
/ sizeof(WCHAR
) <= 12);
536 Info
->ShortNameLength
= Fcb
->ShortNameU
.Length
;
537 RtlCopyMemory(Info
->ShortName
, Fcb
->ShortNameU
.Buffer
, Fcb
->ShortNameU
.Length
);
539 return(STATUS_SUCCESS
);
544 CdfsQueryDirectory(PDEVICE_OBJECT DeviceObject
,
547 PDEVICE_EXTENSION DeviceExtension
;
548 LONG BufferLength
= 0;
549 PUNICODE_STRING SearchPattern
= NULL
;
550 FILE_INFORMATION_CLASS FileInformationClass
;
552 PUCHAR Buffer
= NULL
;
553 PFILE_NAMES_INFORMATION Buffer0
= NULL
;
557 BOOLEAN First
= FALSE
;
558 PIO_STACK_LOCATION Stack
;
559 PFILE_OBJECT FileObject
;
560 NTSTATUS Status
= STATUS_SUCCESS
;
562 DPRINT("CdfsQueryDirectory() called\n");
564 DeviceExtension
= DeviceObject
->DeviceExtension
;
565 Stack
= IoGetCurrentIrpStackLocation(Irp
);
566 FileObject
= Stack
->FileObject
;
568 Ccb
= (PCCB
)FileObject
->FsContext2
;
569 Fcb
= (PFCB
)FileObject
->FsContext
;
571 /* Obtain the callers parameters */
572 BufferLength
= Stack
->Parameters
.QueryDirectory
.Length
;
573 SearchPattern
= Stack
->Parameters
.QueryDirectory
.FileName
;
574 FileInformationClass
=
575 Stack
->Parameters
.QueryDirectory
.FileInformationClass
;
576 FileIndex
= Stack
->Parameters
.QueryDirectory
.FileIndex
;
578 /* Determine Buffer for result */
581 Buffer
= MmGetSystemAddressForMdl(Irp
->MdlAddress
);
585 Buffer
= Irp
->UserBuffer
;
588 if (SearchPattern
!= NULL
)
590 if (Ccb
->DirectorySearchPattern
.Buffer
== NULL
)
593 Ccb
->DirectorySearchPattern
.Buffer
=
594 ExAllocatePoolWithTag(NonPagedPool
, SearchPattern
->Length
+ sizeof(WCHAR
), TAG_CCB
);
595 if (Ccb
->DirectorySearchPattern
.Buffer
== NULL
)
597 return STATUS_INSUFFICIENT_RESOURCES
;
599 Ccb
->DirectorySearchPattern
.MaximumLength
= SearchPattern
->Length
+ sizeof(WCHAR
);
600 RtlCopyUnicodeString(&Ccb
->DirectorySearchPattern
, SearchPattern
);
601 Ccb
->DirectorySearchPattern
.Buffer
[SearchPattern
->Length
/ sizeof(WCHAR
)] = 0;
604 else if (Ccb
->DirectorySearchPattern
.Buffer
== NULL
)
607 Ccb
->DirectorySearchPattern
.Buffer
= ExAllocatePoolWithTag(NonPagedPool
, 2 * sizeof(WCHAR
), TAG_CCB
);
608 if (Ccb
->DirectorySearchPattern
.Buffer
== NULL
)
610 return STATUS_INSUFFICIENT_RESOURCES
;
613 Ccb
->DirectorySearchPattern
.Length
= sizeof(WCHAR
);
614 Ccb
->DirectorySearchPattern
.MaximumLength
= 2 * sizeof(WCHAR
);
615 Ccb
->DirectorySearchPattern
.Buffer
[0] = L
'*';
616 Ccb
->DirectorySearchPattern
.Buffer
[1] = 0;
618 DPRINT("Search pattern '%wZ'\n", &Ccb
->DirectorySearchPattern
);
620 /* Determine directory index */
621 if (Stack
->Flags
& SL_INDEX_SPECIFIED
)
623 Ccb
->Entry
= Stack
->Parameters
.QueryDirectory
.FileIndex
;
624 Ccb
->Offset
= Ccb
->CurrentByteOffset
.u
.LowPart
;
626 else if (First
|| (Stack
->Flags
& SL_RESTART_SCAN
))
631 DPRINT("Buffer = %p tofind = %wZ\n", Buffer
, &Ccb
->DirectorySearchPattern
);
633 TempFcb
.ObjectName
= TempFcb
.PathName
;
634 while (Status
== STATUS_SUCCESS
&& BufferLength
> 0)
636 Status
= CdfsFindFile(DeviceExtension
,
639 &Ccb
->DirectorySearchPattern
,
642 DPRINT("Found %S, Status=%x, entry %x\n", TempFcb
.ObjectName
, Status
, Ccb
->Entry
);
644 if (NT_SUCCESS(Status
))
646 switch (FileInformationClass
)
648 case FileNameInformation
:
649 Status
= CdfsGetNameInformation(&TempFcb
,
651 (PFILE_NAMES_INFORMATION
)Buffer
,
655 case FileDirectoryInformation
:
656 Status
= CdfsGetDirectoryInformation(&TempFcb
,
658 (PFILE_DIRECTORY_INFORMATION
)Buffer
,
662 case FileFullDirectoryInformation
:
663 Status
= CdfsGetFullDirectoryInformation(&TempFcb
,
665 (PFILE_FULL_DIR_INFORMATION
)Buffer
,
669 case FileBothDirectoryInformation
:
670 Status
= CdfsGetBothDirectoryInformation(&TempFcb
,
672 (PFILE_BOTH_DIR_INFORMATION
)Buffer
,
677 Status
= STATUS_INVALID_INFO_CLASS
;
680 if (Status
== STATUS_BUFFER_OVERFLOW
)
684 Buffer0
->NextEntryOffset
= 0;
693 Buffer0
->NextEntryOffset
= 0;
698 Status
= STATUS_NO_SUCH_FILE
;
702 Status
= STATUS_NO_MORE_FILES
;
707 Buffer0
= (PFILE_NAMES_INFORMATION
)Buffer
;
708 Buffer0
->FileIndex
= FileIndex
++;
711 if (Stack
->Flags
& SL_RETURN_SINGLE_ENTRY
)
715 BufferLength
-= Buffer0
->NextEntryOffset
;
716 Buffer
+= Buffer0
->NextEntryOffset
;
721 Buffer0
->NextEntryOffset
= 0;
726 Status
= STATUS_SUCCESS
;
735 CdfsDirectoryControl(PDEVICE_OBJECT DeviceObject
,
738 PIO_STACK_LOCATION Stack
;
741 DPRINT("CdfsDirectoryControl() called\n");
742 FsRtlEnterFileSystem();
744 Stack
= IoGetCurrentIrpStackLocation(Irp
);
746 switch (Stack
->MinorFunction
)
748 case IRP_MN_QUERY_DIRECTORY
:
749 Status
= CdfsQueryDirectory(DeviceObject
,
753 case IRP_MN_NOTIFY_CHANGE_DIRECTORY
:
754 DPRINT1("IRP_MN_NOTIFY_CHANGE_DIRECTORY\n");
755 Status
= STATUS_NOT_IMPLEMENTED
;
759 DPRINT1("CDFS: MinorFunction %d\n", Stack
->MinorFunction
);
760 Status
= STATUS_INVALID_DEVICE_REQUEST
;
764 Irp
->IoStatus
.Status
= Status
;
765 Irp
->IoStatus
.Information
= 0;
767 IoCompleteRequest(Irp
, IO_NO_INCREMENT
);
768 FsRtlExitFileSystem();