23#define UDF_BUG_CHECK_ID UDF_FILE_FS_CONTROL
65 Irp->IoStatus.Status = RC;
66 Irp->IoStatus.Information = 0;
112 UDFPrint((
"\nUDFCommonFSControl\n\n"));
123 UDFPrint((
" UDFFSControl: UserFsReq request ....\n"));
129 UDFPrint((
" UDFFSControl: MOUNT_VOLUME request ....\n"));
135 UDFPrint((
" UDFFSControl: VERIFY_VOLUME request ....\n"));
143 Irp->IoStatus.Status = RC;
144 Irp->IoStatus.Information = 0;
154 UDFPrint((
" UDFCommonFSControl: finally\n"));
157 UDFPrint((
" UDFCommonFSControl: finally after exception ***\n"));
198 UDFPrint((
"UDFUserFsCtrlRequest: OPLOCKS\n"));
201 Irp->IoStatus.Information = 0;
232 UDFPrint((
"UDFUserFsCtrlRequest: FSCTL_ALLOW_EXTENDED_DASD_IO\n"));
237 Irp->IoStatus.Information = 0;
273 UDFPrint((
"UDFUserFsCtrlRequest: FSCTL_GET_VOLUME_BITMAP\n"));
279 UDFPrint((
"UDFUserFsCtrlRequest: FSCTL_GET_RETRIEVAL_POINTERS\n"));
287 UDFPrintErr((
"UDFUserFsCtrlRequest: STATUS_INVALID_DEVICE_REQUEST for %x\n",
291 Irp->IoStatus.Information = 0;
330 ULONG MediaChangeCount = 0;
331 ULONG Characteristics;
347 UDFPrint((
"\n !!! UDFMountVolume\n"));
350 fsDeviceObject = PtrIrpContext->TargetDeviceObject;
351 UDFPrint((
"Mount on device object %x\n", fsDeviceObject));
361 UDFPrintErr((
"Invalid node type in FS or FILTER DeviceObject\n"));
379#ifdef UDF_HDD_SUPPORT
408 UDFPrint((
"UDFMountVolume: removable media\n"));
419 &MediaChangeCount,
sizeof(
ULONG),
434 UDFPrint((
"UDFMountVolume: TEST_UNIT_READY %x\n", RC));
440 UDFPrint((
"UDFMountVolume: retry\n"));
448 UDFPrint((
"UDFMountVolume: additional delay 3 sec\n"));
459 &MediaChangeCount,
sizeof(
ULONG),
463 UDFPrint((
"UDFMountVolume: retry check verify\n"));
467 &MediaChangeCount,
sizeof(
ULONG),
476 MediaChangeCount = 0;
516 UDFPrint((
"UDFMountVolume: create device\n"));
533 VolDo->
Flags &= ~DO_DEVICE_INITIALIZING;
543 Vcb = (
PVCB)VolDo->DeviceExtension;
561 Vcb->Vpb->ReferenceCount ++;
563 Vcb->MediaChangeCount = MediaChangeCount;
564 Vcb->FsDeviceType = FsDeviceType;
568 Vcb->Vpb->RealDevice->Flags &= ~DO_VERIFY_VOLUME;
569 RestoreDoVerify =
TRUE;
572 DeviceNotTouched =
FALSE;
579 Vcb->MountPhErrorCount = 0;
584 Vcb->WCacheMaxFrames,
585 Vcb->WCacheMaxBlocks,
587 5,
Vcb->BlockSizeBits,
588 Vcb->WCacheBlocksPerFrameSh,
594 Vcb->WCacheFramesToKeepFree,
598 UDFTWriteAsync, UDFTReadAsync,
619#ifdef UDF_READ_ONLY_BUILD
625 UDFPrint((
"UDFMountVolume: try raw mount\n"));
627 UDFPrint((
"UDFMountVolume: block raw mount due to ISO9660 presence\n"));
628 Vcb->VCBFlags &= ~UDF_VCB_FLAGS_RAW_DISK;
632 UDFPrint((
"UDFMountVolume: try raw mount (2)\n"));
635 UDFPrint((
"UDFMountVolume: trying raw mount...\n"));
636 Vcb->VolIdent.Length =
638 if(
Vcb->VolIdent.Buffer)
641 if(!
Vcb->VolIdent.Buffer)
653 Vcb->MountPhErrorCount = -1;
654#ifndef UDF_READ_ONLY_BUILD
657 UDFPrint((
"UDFMountVolume: writable volume\n"));
661 UDFPrint((
"UDFMountVolume: RAM mode\n"));
664 UDFPrint((
"UDFMountVolume: RW mode\n"));
672 UDFPrint((
"UDFMountVolume: R mode\n"));
677 UDFPrint((
"UDFMountVolume: NO ACL and ExtFE support\n"));
697 Vcb->VCBOpenCount = 1;
702 Vcb->VCBFlags &= ~UDF_VCB_FLAGS_RAW_DISK;
705#ifndef UDF_READ_ONLY_BUILD
710 UDFPrint((
"UDFMountVolume: RO mount\n"));
715 Vcb->Vpb->SerialNumber =
Vcb->PhSerialNumber;
716 Vcb->Vpb->VolumeLabelLength =
Vcb->VolIdent.Length;
718 Vcb->VolIdent.Buffer,
719 Vcb->VolIdent.Length );
727 if(!
Vcb->ShutdownRegistered) {
728 UDFPrint((
"UDFMountVolume: Register shutdown routine\n"));
730 Vcb->ShutdownRegistered =
TRUE;
736 UDFPrint((
"UDFMountVolume: unlock media on RO volume\n"));
750 Vcb->IsVolumeJustMounted =
TRUE;
764 UDFPrint((
"UDFMountVolume: RC = %x\n", RC));
773 UDFPrint((
"UDFMountVolume: unlock media\n"));
784 if(!DeviceNotTouched &&
786 UDFPrint((
"UDFMountVolume: reset driver\n"));
791 UDFPrint((
"UDFMountVolume: status -> STATUS_UNRECOGNIZED_VOLUME\n"));
802 if(RestoreDoVerify) {
806 if(
Vcb->VCBOpenCount)
823 UDFPrint((
"UDFMountVolume: complete req RC %x\n", RC));
826 Irp->IoStatus.Status = RC;
834 Irp->CurrentLocation++;
835 Irp->Tail.Overlay.CurrentStackLocation++;
844 UDFPrint((
"UDFMountVolume: final RC = %x\n", RC));
856 UDFPrint((
"UDFStartEjectWaiter:\n"));
859 UDFPrint((
" UDF_VCB_FLAGS_MEDIA_READ_ONLY\n"));
862 UDFPrint((
" UDF_VCB_FLAGS_MEDIA_LOCKED\n"));
867 !(
Vcb->EjectWaiter)) {
869 UDFPrint((
"UDFStartEjectWaiter: check driver\n"));
874 UDFPrint((
" not our driver, ignore\n"));
877 UDFPrint((
"UDFStartEjectWaiter: check removable\n"));
880 UDFPrint((
"UDFStartEjectWaiter: lock media\n"));
889 UDFPrint((
"UDFStartEjectWaiter: prepare to start\n"));
894 Vcb->EjectWaiter->Vcb =
Vcb;
895 Vcb->EjectWaiter->SoftEjectReq =
FALSE;
898 Vcb->EjectWaiter->WaiterStopped = &(
Vcb->WaiterStopped);
904 UDFPrint((
"UDFStartEjectWaiter: create thread\n"));
929 UDFPrint((
"UDFCompleteMount: alloc Root FCB\n"));
935 UDFPrint((
"UDFCompleteMount: alloc Root ObjName\n"));
957 UDFPrint((
"UDFCompleteMount: open Root Dir\n"));
969 UDFPrint((
"UDFCompleteMount: alloc Root ObjName (2)\n"));
978 UDFPrint((
"UDFCompleteMount: init FCB\n"));
1006 if(
Vcb->SysStreamLbAddr.logicalBlockNum) {
1008 if(!
Vcb->SysSDirFileInfo) {
1065 if(
Vcb->SysSDirFileInfo) {
1087 if(
Vcb->SysSDirFileInfo) {
1107#define DWN_MAX_CFG_FILE_SIZE 0x10000
1132 Vcb->CfgVersion = 0;
1159 PtrCommonFCBHeader = &(
NtReqFcb->CommonFCBHeader);
1276 if(
Vcb->ShowBlankCd == 2) {
1327 PtrCommonFCBHeader = &(
NtReqFcb->CommonFCBHeader);
1354 if(
Vcb->VCBOpenCount)
1356 UDFPrint((
"UDFCloseResidual: NonAllocFileInfo %x\n",
Vcb->NonAllocFileInfo));
1357 if(
Vcb->NonAllocFileInfo) {
1364 UDFPrint((
"UDFCloseResidual: NonAllocFileInfo %x\n",
Vcb->NonAllocFileInfo));
1365 if(
Vcb->UniqueIDMapFileInfo) {
1369 Vcb->UniqueIDMapFileInfo =
NULL;
1372 UDFPrint((
"UDFCloseResidual: VatFileInfo %x\n",
Vcb->VatFileInfo));
1373 if(
Vcb->VatFileInfo) {
1380 UDFPrint((
"UDFCloseResidual: SysSDirFileInfo %x\n",
Vcb->SysSDirFileInfo));
1381 if(
Vcb->SysSDirFileInfo) {
1414 UDFPrint((
"UDFCloseResidual: RootDirFCB %x\n",
Vcb->RootDirFCB));
1415 if(
Vcb->RootDirFCB) {
1417 if(
Vcb->RootDirFCB->OpenHandleCount)
1418 Vcb->RootDirFCB->OpenHandleCount--;
1421 if(
Vcb->VCBOpenCount)
1439 if(
Vcb->ShutdownRegistered &&
Vcb->VCBDeviceObject) {
1449 if(
Vcb->FSBM_Bitmap) {
1453 if(
Vcb->ZSBM_Bitmap) {
1457 if(
Vcb->BSBM_Bitmap) {
1461#ifdef UDF_TRACK_ONDISK_ALLOCATION_OWNERS
1462 if(
Vcb->FSBM_Bitmap_owners) {
1464 Vcb->FSBM_Bitmap_owners =
NULL;
1467 if(
Vcb->FSBM_OldBitmap) {
1562 UDFPrint((
"UDFIsVolumeMounted\n"));
1567 Irp->IoStatus.Information = 0;
1584 Irp->IoStatus.Information = 0;
1625 Irp->IoStatus.Information = 0;
1672 UDFPrint((
"UDFIsPathnameValid\n"));
1687 TmpBuffer = PathName.
Buffer;
1708 Irp->IoStatus.Information = 0;
1709 Irp->IoStatus.Status = RC;
1740 UDFPrint((
"UDFLockVolume: PID %x\n", PID));
1747 Irp->IoStatus.Information = 0;
1756 Irp->IoStatus.Information = 0;
1767#ifdef UDF_DELAYED_CLOSE
1804 VcbAcquired =
FALSE;
1812 VcbAcquired =
FALSE;
1819 (
Vcb->VolumeLockPID == (
ULONG)-1) &&
1821 (
Vcb->Vpb->ReferenceCount == 2)) {
1824 if(PID == (
ULONG)-1) {
1829 Vcb->VolumeLockPID = PID;
1845 Irp->IoStatus.Information = 0;
1846 Irp->IoStatus.Status = RC;
1874 UDFPrint((
"UDFUnlockVolume: PID %x\n", PID));
1881 Irp->IoStatus.Information = 0;
1890 Irp->IoStatus.Information = 0;
1903 Vcb->VolumeLockPID == PID) {
1904 Vcb->Vpb->Flags &= ~VPB_LOCKED;
1905 Vcb->VCBFlags &= ~UDF_VCB_FLAGS_VOLUME_LOCKED;
1906 Vcb->VolumeLockFileObject =
NULL;
1907 Vcb->VolumeLockPID = -1;
1924 Irp->IoStatus.Information = 0;
1925 Irp->IoStatus.Status = RC;
1957 UDFPrint((
"\n ### UDFDismountVolume ###\n\n"));
1964 Irp->IoStatus.Information = 0;
1973 Irp->IoStatus.Information = 0;
1982#ifdef UDF_DELAYED_CLOSE
1998 VcbAcquired =
FALSE;
2019 Vcb->VCBFlags &= ~UDF_VCB_FLAGS_VOLUME_MOUNTED;
2023 VcbAcquired =
FALSE;
2042 Irp->IoStatus.Information = 0;
2043 Irp->IoStatus.Status = RC;
2083 UDFPrint((
"UDFGetVolumeBitmap\n"));
2086 ULONG TotalClusters;
2087 ULONG DesiredClusters;
2088 ULONG StartingCluster;
2103 Irp->IoStatus.Information = 0;
2122 Irp->IoStatus.Information = 0;
2128 TotalClusters =
Vcb->FSBM_BitCount;
2134 Irp->IoStatus.Information = 0;
2140 StartingCluster = StartingLcn.
LowPart & ~7;
2144 DesiredClusters = TotalClusters - StartingCluster;
2168 LSh =
Vcb->LB2B_Bits;
2171 for(
i=StartingCluster & ~7;
i<lim;
i++) {
2186 Irp->IoStatus.Information = 0;
2237 UDFPrint((
"UDFGetRetrievalPointers\n"));
2244 Irp->IoStatus.Information = 0;
2269 Irp->IoStatus.Information = 0;
2312 LBS =
Vcb->LBlockSize;
2313 LBSh =
Vcb->LBlockSizeBits;
2314 L2BSh =
Vcb->LB2B_Bits;
2331 for(
i=0;
i<SubExtInfoSz;
i++) {
2339 if(SubMapping[
i].extLocation & 0x80000000) {
2359 Irp->IoStatus.Status = RC;
2382 Irp->IoStatus.Information = 0;
2384 if (
Irp->AssociatedIrp.SystemBuffer !=
NULL) {
2386 }
else if (
Irp->MdlAddress !=
NULL) {
2407 Irp->IoStatus.Information = 0;
2429 Irp->IoStatus.Information =
sizeof(
ULONG);
2451 UDFPrint((
"UDFInvalidateVolumes\n"));
2467 Irp->IoStatus.Information = 0;
2475 UDFPrintErr((
"UDFInvalidateVolumes: STATUS_PRIVILEGE_NOT_HELD\n"));
2481 UDFPrintErr((
"UDFInvalidateVolumes: STATUS_INVALID_PARAMETER\n"));
2492 (
PVOID*)&FileToMarkBad,
2496 UDFPrintErr((
"UDFInvalidateVolumes: can't get handle, RC=%x\n", RC));
2497 Irp->IoStatus.Status = RC;
2505 DeviceToMarkBad = FileToMarkBad->DeviceObject;
2511 UDFPrintErr((
"UDFInvalidateVolumes: STATUS_INSUFFICIENT_RESOURCES\n"));
2528 DeviceToMarkBad->Vpb = NewVpb;
2531 ASSERT( DeviceToMarkBad->Vpb->DeviceObject ==
NULL );
2552 if (
Vcb->Vpb->RealDevice == DeviceToMarkBad) {
2557 UDFPrintErr((
"UDFInvalidateVolumes: STATUS_INSUFFICIENT_RESOURCES (2)\n"));
2565#ifdef UDF_DELAYED_CLOSE
2566 UDFPrint((
" UDFInvalidateVolumes: set UDF_VCB_FLAGS_NO_DELAYED_CLOSE\n"));
2571 if(
Vcb->RootDirFCB &&
Vcb->RootDirFCB->FileInfo) {
2572 UDFPrint((
" UDFInvalidateVolumes: UDFCloseAllSystemDelayedInDir\n"));
2576#ifdef UDF_DELAYED_CLOSE
2577 UDFPrint((
" UDFInvalidateVolumes: UDFCloseAllDelayed\n"));
2588 UDFPrint((
"UDFInvalidateVolumes: Vcb %x dismounted\n",
Vcb));
2591 UDFPrint((
"UDFInvalidateVolumes: skip Vcb %x\n",
Vcb));
2603 UDFPrint((
"UDFInvalidateVolumes: free buffer\n"));
2608 UDFPrint((
"UDFInvalidateVolumes: drop volume completly\n"));
2613 UDFPrint((
"UDFInvalidateVolumes: done\n"));
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define STATUS_PRIVILEGE_NOT_HELD
VOID UDFGetFileXTime(IN PUDF_FILE_INFO FileInfo, OUT LONGLONG *CrtTime, OUT LONGLONG *AccTime, OUT LONGLONG *AttrTime, OUT LONGLONG *ChgTime)
int64 __fastcall UDFGetTotalSpace(IN PVCB Vcb)
int64 __fastcall UDFGetFreeSpace(IN PVCB Vcb)
uint32 UDFIsBlockAllocated(IN void *_Vcb, IN uint32 Lba)
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
#define SCSI_ADSENSE_LUN_NOT_READY
#define SCSI_SENSEQ_BECOMING_READY
#define SCSI_SENSE_NOT_READY
struct _PREVENT_MEDIA_REMOVAL_USER_IN * PPREVENT_MEDIA_REMOVAL_USER_IN
#define CdrwMediaClassEx_IsRAM(MediaClassEx)
#define IOCTL_CDRW_TEST_UNIT_READY
VOID UDFCloseAllDelayed(IN PVCB Vcb)
ULONG UDFCleanUpFcbChain(IN PVCB Vcb, IN PUDF_FILE_INFO fi, IN ULONG TreeLength, IN BOOLEAN VcbAcquired)
OSSTATUS UDFStoreDloc(IN PVCB Vcb, IN PUDF_FILE_INFO fi, IN uint32 Lba)
PDIR_INDEX_HDR UDFGetDirIndexByFileInfo(IN PUDF_FILE_INFO FileInfo)
void UDFReleaseDlocList(IN PVCB Vcb)
uint8 UDFBuildHashEntry(IN PVCB Vcb, IN PUNICODE_STRING Name, OUT PHASH_ENTRY hashes, IN uint8 Mask)
#define NT_SUCCESS(StatCode)
_In_ PIO_STACK_LOCATION IrpSp
NTSTATUS UDFInitializeFCB(IN PtrUDFFCB PtrNewFcb, IN PVCB Vcb, IN PtrUDFObjectName PtrObjectName, IN ULONG Flags, IN PFILE_OBJECT FileObject)
NTSTATUS UDFExceptionHandler(PtrUDFIrpContext PtrIrpContext, PIRP Irp)
VOID UDFReadRegKeys(PVCB Vcb, BOOLEAN Update, BOOLEAN UseCfg)
VOID __fastcall UDFCleanUpFCB(PtrUDFFCB Fcb)
BOOLEAN __fastcall UDFIsIrpTopLevel(PIRP Irp)
VOID UDFLogEvent(NTSTATUS UDFEventLogId, NTSTATUS RC)
PtrUDFIrpContext UDFAllocateIrpContext(PIRP Irp, PDEVICE_OBJECT PtrTargetDeviceObject)
VOID UDFReleaseIrpContext(PtrUDFIrpContext PtrIrpContext)
ULONG UDFGetRegParameter(IN PVCB Vcb, IN PCWSTR Name, IN ULONG DefValue)
VOID __fastcall UDFReleaseObjectName(PtrUDFObjectName PtrObjectName)
NTSTATUS UDFWCacheErrorHandler(IN PVOID Context, IN PWCACHE_ERROR_CONTEXT ErrorInfo)
long UDFExceptionFilter(PtrUDFIrpContext PtrIrpContext, PEXCEPTION_POINTERS PtrExceptionPointers)
PtrUDFObjectName UDFAllocateObjectName(VOID)
PtrUDFFCB UDFAllocateFCB(VOID)
NTSTATUS UDFInitializeVCB(IN PDEVICE_OBJECT PtrVolumeDeviceObject, IN PDEVICE_OBJECT PtrTargetDeviceObject, IN PVPB PtrVPB)
VOID CompleteIrp(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
#define INTEGRITY_TYPE_OPEN
NTSTATUS NTAPI UDFPhSendIOCTL(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, OUT PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN OverrideVerify, OUT PIO_STATUS_BLOCK Iosb OPTIONAL)
NTSTATUS NTAPI UDFTSendIOCTL(IN ULONG IoControlCode, IN PVCB Vcb, IN PVOID InputBuffer, IN ULONG InputBufferLength, OUT PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN OverrideVerify, OUT PIO_STATUS_BLOCK Iosb OPTIONAL)
#define UDFNotifyVolumeEvent(FileObject, EventCode)
#define UDFReleaseResource(Resource)
#define DbgAllocatePoolWithTag(a, b, c)
NTSTATUS MyInitUnicodeString(IN PUNICODE_STRING Str1, IN PCWSTR Str2)
struct _DEVICE_OBJECT * PDEVICE_OBJECT
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeSetEvent(pEvt, foo, foo2)
#define UDFAcquireResourceExclusive(Resource, CanWait)
#define UDFInterlockedDecrement(addr)
#define UDFInterlockedIncrement(addr)
#define KeDelayExecutionThread(mode, foo, t)
#define UDF_ERROR_INTERNAL_ERROR
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
IN OUT PVCB IN PDEVICE_OBJECT TargetDeviceObject
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
IN PFCB IN PFILE_OBJECT FileObject IN ULONG AllocationSize
IN PVCB IN FAT_VOLUME_STATE VolumeState
FILE_SYSTEM_STATISTICS * PFILE_SYSTEM_STATISTICS
struct _FILE_SYSTEM_STATISTICS FILE_SYSTEM_STATISTICS
static unsigned char buff[32768]
VOID UDFReleaseFileIdCache(IN PVCB Vcb)
ULONG UDFFlushLogicalVolume(IN PtrUDFIrpContext PtrIrpContext, IN PIRP Irp, IN PVCB Vcb, IN ULONG FlushFlags)
NTSTATUS UDFBlankMount(IN PVCB Vcb)
NTSTATUS UDFIsPathnameValid(IN PtrUDFIrpContext IrpContext, IN PIRP Irp)
NTSTATUS NTAPI UDFFSControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS UDFUnlockVolume(IN PtrUDFIrpContext IrpContext, IN PIRP Irp, IN ULONG PID)
#define DWN_MAX_CFG_FILE_SIZE
NTSTATUS NTAPI UDFCommonFSControl(PtrUDFIrpContext PtrIrpContext, PIRP Irp)
NTSTATUS UDFGetStatistics(IN PtrUDFIrpContext IrpContext, IN PIRP Irp)
NTSTATUS UDFLockVolume(IN PtrUDFIrpContext IrpContext, IN PIRP Irp, IN ULONG PID)
NTSTATUS UDFIsVolumeMounted(IN PtrUDFIrpContext IrpContext, IN PIRP Irp)
NTSTATUS NTAPI UDFUserFsCtrlRequest(PtrUDFIrpContext IrpContext, PIRP Irp)
VOID UDFScanForDismountedVcb(IN PtrUDFIrpContext IrpContext)
NTSTATUS NTAPI UDFMountVolume(IN PtrUDFIrpContext PtrIrpContext, IN PIRP Irp)
NTSTATUS UDFGetRetrievalPointers(IN PtrUDFIrpContext IrpContext, IN PIRP Irp, IN ULONG Special)
NTSTATUS UDFCompleteMount(IN PVCB Vcb)
NTSTATUS UDFIsVolumeDirty(IN PtrUDFIrpContext IrpContext, IN PIRP Irp)
NTSTATUS UDFStartEjectWaiter(IN PVCB Vcb)
NTSTATUS UDFDismountVolume(IN PtrUDFIrpContext IrpContext, IN PIRP Irp)
PDIR_INDEX_HDR UDFDirIndexAlloc(IN uint_di i)
NTSTATUS UDFInvalidateVolumes(IN PtrUDFIrpContext IrpContext, IN PIRP Irp)
VOID UDFCleanupVCB(IN PVCB Vcb)
NTSTATUS UDFGetVolumeBitmap(IN PtrUDFIrpContext IrpContext, IN PIRP Irp)
VOID UDFCloseResidual(IN PVCB Vcb)
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define EXCEPTION_EXECUTE_HANDLER
#define EXCEPTION_CONTINUE_SEARCH
POBJECT_TYPE IoFileObjectType
VOID UDFPreClrModified(IN PVCB Vcb)
VOID UDFClrModified(IN PVCB Vcb)
OSSTATUS UDFGetDiskInfoAndVerify(IN PDEVICE_OBJECT DeviceObject, IN PVCB Vcb)
BOOLEAN __fastcall UDFIsNameValid(IN PUNICODE_STRING SearchPattern, OUT BOOLEAN *StreamOpen, OUT ULONG *SNameIndex)
PWCHAR __fastcall UDFDissectName(IN PWCHAR Buffer, OUT PUSHORT Length)
_In_ UINT _In_ UINT BytesToCopy
_In_ PMEMORY_AREA _In_ PVOID _In_ BOOLEAN Locked
#define FSCTL_OPLOCK_BREAK_NOTIFY
#define FILE_ATTRIBUTE_READONLY
#define FSCTL_LOCK_VOLUME
#define FSCTL_OPLOCK_BREAK_ACKNOWLEDGE
#define FSCTL_REQUEST_OPLOCK_LEVEL_1
#define FSCTL_REQUEST_FILTER_OPLOCK
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define FSCTL_INVALIDATE_VOLUMES
#define FSCTL_IS_PATHNAME_VALID
#define FSCTL_UNLOCK_VOLUME
#define FSCTL_REQUEST_BATCH_OPLOCK
#define FILE_FLOPPY_DISKETTE
#define FSCTL_FILESYSTEM_GET_STATISTICS
#define FSCTL_OPBATCH_ACK_CLOSE_PENDING
#define FSCTL_OPLOCK_BREAK_ACK_NO_2
#define FSCTL_IS_VOLUME_MOUNTED
#define FSCTL_REQUEST_OPLOCK_LEVEL_2
#define FSCTL_DISMOUNT_VOLUME
#define FILE_REMOVABLE_MEDIA
#define IOCTL_CDROM_GET_DRIVE_GEOMETRY
#define IOCTL_STORAGE_CHECK_VERIFY
#define IOCTL_STORAGE_MEDIA_REMOVAL
#define FSRTL_VOLUME_UNLOCK
#define FSRTL_VOLUME_LOCK
#define FSRTL_VOLUME_DISMOUNT_FAILED
#define FSRTL_VOLUME_DISMOUNT
#define FSRTL_VOLUME_MOUNT
#define VPB_REMOVE_PENDING
#define FSRTL_VOLUME_LOCK_FAILED
BOOLEAN NTAPI FsRtlIsNtstatusExpected(IN NTSTATUS NtStatus)
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
NTSTATUS NTAPI IoRegisterShutdownNotification(PDEVICE_OBJECT DeviceObject)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
VOID NTAPI IoUnregisterShutdownNotification(PDEVICE_OBJECT DeviceObject)
#define IoCompleteRequest
VOID NTAPI IoSetTopLevelIrp(IN PIRP Irp)
VOID NTAPI IoReleaseVpbSpinLock(IN KIRQL Irql)
VOID NTAPI IoAcquireVpbSpinLock(OUT PKIRQL Irql)
BOOLEAN NTAPI SeSinglePrivilegeCheck(_In_ LUID PrivilegeValue, _In_ KPROCESSOR_MODE PreviousMode)
Checks if a single privilege is present in the context of the calling thread.
#define STATUS_VOLUME_DISMOUNTED
#define STATUS_NOT_LOCKED
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
#define UDF_FN_NON_ALLOCATABLE_2
#define UDF_FN_NON_ALLOCATABLE
#define UDF_SN_UID_MAPPING
#define UDF_SN_NON_ALLOCATABLE
OSSTATUS UDFGetDiskInfo(IN PDEVICE_OBJECT DeviceObject, IN PVCB Vcb)
OSSTATUS UDFResetDeviceDriver(IN PVCB Vcb, IN PDEVICE_OBJECT TargetDeviceObject, IN BOOLEAN Unlock)
VOID NTAPI UDFEjectReqWaiter(IN PVOID Context)
OSSTATUS UDFDoDismountSequence(IN PVCB Vcb, IN PPREVENT_MEDIA_REMOVAL_USER_IN Buf, IN BOOLEAN Eject)
VOID UDFStopEjectWaiter(PVCB Vcb)
OSSTATUS UDFTReadVerify(IN void *_Vcb, IN void *Buffer, IN SIZE_T Length, IN uint32 LBA, OUT PSIZE_T ReadBytes, IN uint32 Flags)
OSSTATUS UDFTWriteVerify(IN void *_Vcb, IN void *Buffer, IN SIZE_T Length, IN uint32 LBA, OUT PSIZE_T WrittenBytes, IN uint32 Flags)
NTSTATUS UDFVerifyVcb(IN PtrUDFIrpContext IrpContext, IN PVCB Vcb)
PVOID UDFGetCallersBuffer(PtrUDFIrpContext PtrIrpContext, PIRP Irp)
BOOLEAN UDFDismountVcb(IN PVCB Vcb, IN BOOLEAN VcbAcquired)
NTSTATUS UDFUnlockCallersBuffer(PtrUDFIrpContext PtrIrpContext, PIRP Irp, PVOID SystemBuffer)
NTSTATUS UDFVerifyVolume(IN PIRP Irp)
NTSTATUS UDFAssignAcl(IN PVCB Vcb, IN PFILE_OBJECT FileObject, IN PtrUDFFCB Fcb, IN PtrUDFNTRequiredFCB NtReqFcb)
BOOLEAN UDFCheckForDismount(IN PtrUDFIrpContext IrpContext, IN PVCB Vcb, IN BOOLEAN VcbAcquired)
#define UDFCloseAllSystemDelayedInDir(Vcb, FI)
#define FILE_DEVICE_DISK_FILE_SYSTEM
struct STARTING_LCN_INPUT_BUFFER * PSTARTING_LCN_INPUT_BUFFER
struct VOLUME_BITMAP_BUFFER * PVOLUME_BITMAP_BUFFER
struct STARTING_VCN_INPUT_BUFFER * PSTARTING_VCN_INPUT_BUFFER
#define FSCTL_IS_VOLUME_DIRTY
struct RETRIEVAL_POINTERS_BUFFER * PRETRIEVAL_POINTERS_BUFFER
#define FSCTL_GET_RETRIEVAL_POINTERS
#define FILE_DEVICE_CD_ROM
#define FILE_DEVICE_CD_ROM_FILE_SYSTEM
#define FSCTL_GET_VOLUME_BITMAP
#define _SEH2_AbnormalTermination()
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_GetExceptionInformation()
#define FSCTL_ALLOW_EXTENDED_DASD_IO
OSSTATUS UDFVInit(IN PVCB Vcb)
#define STATUS_DEVICE_NOT_READY
#define STATUS_END_OF_FILE
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
#define UDF_NODE_TYPE_FILTER_DEVOBJ
struct _UDFFileControlBlock UDFFCB
struct _FILTER_DEV_EXTENSION * PFILTER_DEV_EXTENSION
#define UDF_CCB_VOLUME_OPEN
struct _UDFEjectWaitContext * PUDFEjectWaitContext
struct _UDFContextControlBlock * PtrUDFCCB
#define UDF_FCB_ROOT_DIRECTORY
#define UDF_RESIDUAL_REFERENCE
#define UDF_NODE_TYPE_FCB
#define UDF_FCB_DIRECTORY
#define UDF_IRP_CONTEXT_FLAG_DISABLE_POPUPS
#define UDF_NODE_TYPE_UDFFS_DEVOBJ
ULONG AlignmentRequirement
struct _UDF_FILE_INFO * FileInfo
uint8 FileCharacteristics
struct _FCB::@731::@734 Fcb
PDEVICE_OBJECT lowerFSDeviceObject
UDFIdentifier NodeIdentifier
union _IO_STACK_LOCATION::@1581 Parameters
struct _IO_STACK_LOCATION::@3980::@3995 FileSystemControl
PDEVICE_OBJECT DeviceObject
struct _IO_STACK_LOCATION::@3980::@4000 MountVolume
UCHAR AdditionalSenseCodeQualifier
UCHAR AdditionalSenseCode
PtrUDFNTRequiredFCB NTRequiredFCB
UDFIdentifier NodeIdentifier
LARGE_INTEGER CreationTime
LARGE_INTEGER LastWriteTime
LARGE_INTEGER LastAccessTime
UNICODE_STRING ObjectName
struct _UDFNTRequiredFCB * CommonFcb
struct _UDF_FILE_INFO * PrevLinkedFile
struct _UDFFileControlBlock * Fcb
struct _UDF_FILE_INFO * NextLinkedFile
struct _DEVICE_OBJECT * RealDevice
#define FIELD_OFFSET(t, f)
union _LARGE_INTEGER LARGE_INTEGER
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define UDF_VCB_FLAGS_STOP_WAITER_EVENT
#define UDF_VCB_FLAGS_NO_DELAYED_CLOSE
#define UDF_VCB_FLAGS_VOLUME_MOUNTED
#define UDF_VCB_FLAGS_REMOVABLE_MEDIA
#define UDF_VCB_FLAGS_VOLUME_LOCKED
#define UDF_VCB_FLAGS_VOLUME_READ_ONLY
#define UDF_VCB_FLAGS_RAW_DISK
#define UDF_VCB_FLAGS_MEDIA_READ_ONLY
#define UDF_VCB_FLAGS_BEING_DISMOUNTED
#define UDF_VCB_FLAGS_OUR_DEVICE_DRIVER
#define UDF_VCB_FLAGS_MEDIA_LOCKED
#define UDF_DATA_FLAGS_BEING_UNLOADED
OSSTATUS UDFOpenRootFile__(IN PVCB Vcb, IN lb_addr *RootLoc, OUT PUDF_FILE_INFO FileInfo)
OSSTATUS UDFUpdateVAT(IN void *_Vcb, IN uint32 Lba, IN uint32 *RelocTab, IN uint32 BCount)
int64 UDFGetFileSize(IN PUDF_FILE_INFO FileInfo)
OSSTATUS UDFCloseFile__(IN PVCB Vcb, IN PUDF_FILE_INFO FileInfo)
uint32 UDFCleanUpFile__(IN PVCB Vcb, IN PUDF_FILE_INFO FileInfo)
OSSTATUS UDFOpenFile__(IN PVCB Vcb, IN BOOLEAN IgnoreCase, IN BOOLEAN NotDeleted, IN PUNICODE_STRING fn, IN PUDF_FILE_INFO DirInfo, OUT PUDF_FILE_INFO *_FileInfo, IN uint_di *IndexToOpen)
#define UDFGetFileAllocationSize(Vcb, FileInfo)
__inline PDIR_INDEX_ITEM UDFDirIndex(IN PDIR_INDEX_HDR hDirNdx, IN uint_di i)
#define UDFNtAclSupported(Vcb)
#define UDFSetFreeBit(arr, bit)
__inline OSSTATUS UDFReadFileLocation__(IN PVCB Vcb, IN PUDF_FILE_INFO FileInfo, IN int64 Offset, OUT PEXTENT_MAP *SubExtInfo, IN OUT uint32 *SubExtInfoSz, OUT int64 *NextOffset)
#define UDFGetFreeBit(arr, bit)
__inline OSSTATUS UDFReadFile__(IN PVCB Vcb, IN PUDF_FILE_INFO FileInfo, IN int64 Offset, IN SIZE_T Length, IN BOOLEAN Direct, OUT int8 *Buffer, OUT PSIZE_T ReadBytes)
#define UDFMarkSpaceAsXXX(Vcb, FileInfo, Map, asXXX)
#define REG_MOUNT_ON_ZIP_NAME
#define REG_MOUNT_ON_HDD_NAME
#define REG_MOUNT_ON_CDONLY_NAME
#define UDF_WAIT_CD_SPINUP
#define UDF_BLANK_VOLUME_LABEL
#define LBA_NOT_ALLOCATED
#define UDF_READY_MAX_RETRY
#define UDF_FI_FLAG_FI_INTERNAL
Given entry represents the file used for internal FS purposes & must be invisible.
#define EXTENT_FLAG_VERIFY
#define UDF_FI_FLAG_SYS_ATTR
Given entry of file list contains valid file attributes & times in NT-specific format.
#define VRS_ISO9660_FOUND
struct _UDF_FILE_INFO * PUDF_FILE_INFO
#define STATUS_IO_DEVICE_ERROR
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_UNRECOGNIZED_VOLUME
#define STATUS_INVALID_USER_BUFFER
#define STATUS_VERIFY_REQUIRED
#define STATUS_FILE_CORRUPT_ERROR
#define STATUS_OBJECT_NAME_INVALID
#define STATUS_INSUFFICIENT_RESOURCES
#define STATUS_OBJECT_NAME_NOT_FOUND
#define UDFQuadAlign(Value)
#define UDFPrintErr(Args)
#define PEXTENDED_IO_STACK_LOCATION
#define UDF_CONFIG_STREAM_NAME_W
static int Link(const char **args)
OSSTATUS WCacheInit__(IN PW_CACHE Cache, IN ULONG MaxFrames, IN ULONG MaxBlocks, IN SIZE_T MaxBytesToRead, IN ULONG PacketSizeSh, IN ULONG BlockSizeSh, IN ULONG BlocksPerFrameSh, IN lba_t FirstLba, IN lba_t LastLba, IN ULONG Mode, IN ULONG Flags, IN ULONG FramesToKeepFree, IN PWRITE_BLOCK WriteProc, IN PREAD_BLOCK ReadProc, IN PWRITE_BLOCK_ASYNC WriteProcAsync, IN PREAD_BLOCK_ASYNC ReadProcAsync, IN PCHECK_BLOCK CheckUsedProc, IN PUPDATE_RELOC UpdateRelocProc, IN PWC_ERROR_HANDLER ErrorHandlerProc)
OSSTATUS WCacheSetMode__(IN PW_CACHE Cache, IN ULONG Mode)
ULONG WCacheChFlags__(IN PW_CACHE Cache, IN ULONG SetFlags, IN ULONG ClrFlags)
#define WCACHE_RO_BAD_BLOCKS
#define WCACHE_CACHE_WHOLE_PACKET
#define WCACHE_MARK_BAD_BLOCKS
#define WCACHE_DO_NOT_COMPARE
#define WCACHE_CHAINED_IO
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
_In_ UCHAR _In_ UCHAR MinorFunction
_In_ WDFREQUEST _In_ size_t OutputBufferLength
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
VOID NTAPI ExQueueWorkItem(IN PWORK_QUEUE_ITEM WorkItem, IN WORK_QUEUE_TYPE QueueType)
#define ExInitializeWorkItem(Item, Routine, Context)
#define IRP_MJ_FILE_SYSTEM_CONTROL
#define IRP_MN_VERIFY_VOLUME
#define IRP_MN_USER_FS_REQUEST
#define IO_DISK_INCREMENT
struct _PATHNAME_BUFFER * PPATHNAME_BUFFER
#define IRP_MN_MOUNT_VOLUME
#define MmGetSystemAddressForMdl(Mdl)
#define ObDereferenceObject