21#define UDF_BUG_CHECK_ID UDF_FILE_INFORMATION
23#define MEM_USREN_TAG "US_Ren"
24#define MEM_USREN2_TAG "US_Ren2"
25#define MEM_USFIDC_TAG "US_FIDC"
26#define MEM_USHL_TAG "US_HL"
73 Irp->IoStatus.Status = RC;
74 Irp->IoStatus.Information = 0;
137 TmPrint((
"UDFCommonFileInfo: irp %x\n",
Irp));
142 UDFPrint((
" FSRTL_FSP_TOP_LEVEL_IRP\n"));
145 UDFPrint((
" FSRTL_CACHE_TOP_LEVEL_IRP\n"));
148 UDFPrint((
" FSRTL_MOD_WRITE_TOP_LEVEL_IRP\n"));
151 UDFPrint((
" FSRTL_FAST_IO_TOP_LEVEL_IRP\n"));
155 UDFPrint((
" NULL TOP_LEVEL_IRP\n"));
161 UDFPrint((
" RECURSIVE_IRP, TOP = %x\n", TopIrp));
207 PtrSystemBuffer =
Irp->AssociatedIrp.SystemBuffer;
220#ifdef UDF_ENABLE_SECURITY
222 Ccb->PreviouslyGrantedAccess,
226 &FunctionalityRequested,
240 MainResourceAcquired =
TRUE;
244 switch (FunctionalityRequested) {
251#if(_WIN32_WINNT >= 0x0400)
306#ifndef UDF_READ_ONLY_BUILD
317#ifdef UDF_ENABLE_SECURITY
319 Ccb->PreviouslyGrantedAccess,
323 &FunctionalityRequested,
344 if(
Fcb->FileInfo->ParentFile) {
350 ParentResourceAcquired =
TRUE;
357 MainResourceAcquired =
TRUE;
374 MainResourceAcquired =
TRUE;
380 PagingIoResourceAcquired =
TRUE;
389 MainResourceAcquired =
TRUE;
394 AdPrint((
" Can't change File Information on blank volume ;)\n"));
399 switch (FunctionalityRequested) {
436#ifdef UDF_ALLOW_HARD_LINKS
464 if(PagingIoResourceAcquired) {
466 PagingIoResourceAcquired =
FALSE;
469 if(MainResourceAcquired) {
472 MainResourceAcquired =
FALSE;
475 if(ParentResourceAcquired) {
478 ParentResourceAcquired =
FALSE;
494 Irp->IoStatus.Status = RC;
499#ifndef UDF_READ_ONLY_BUILD
500#ifdef UDF_DELAYED_CLOSE
543 AdPrint((
"UDFGetBasicInformation: \n"));
558 AdPrint((
"!!!!!!!! Bu-u-u-u-u-g !!!!!!!!!!!\n"));
559 AdPrint((
"!!!! GetBasicInfo to unopened file !!!!\n"));
566 DirNdx->
CreationTime = PtrBuffer->CreationTime.QuadPart;
574 PtrBuffer->ChangeTime =
Fcb->NTRequiredFCB->ChangeTime;
575 DirNdx->
ChangeTime = PtrBuffer->ChangeTime.QuadPart;
581 if(!
FileInfo->Dloc->DirIndex)
AdPrint((
"*****!!!!! Directory has no DirIndex !!!!!*****\n"));
591 PtrBuffer->FileAttributes &= ~FILE_ATTRIBUTE_TEMPORARY;
593 if(!PtrBuffer->FileAttributes) {
624 AdPrint((
"UDFGetStandardInformation: \n"));
638 AdPrint((
"!!!!!!!! Bu-u-u-u-u-g !!!!!!!!!!!\n"));
639 AdPrint((
"!!!! GetStandardInfo to unopened file !!!!\n"));
650 PtrBuffer->Directory =
TRUE;
652 if(
Fcb->NTRequiredFCB->CommonFCBHeader.AllocationSize.LowPart == 0xffffffff) {
653 Fcb->NTRequiredFCB->CommonFCBHeader.AllocationSize.QuadPart =
656 PtrBuffer->AllocationSize =
Fcb->NTRequiredFCB->CommonFCBHeader.AllocationSize;
657 PtrBuffer->EndOfFile =
Fcb->NTRequiredFCB->CommonFCBHeader.FileSize;
659 PtrBuffer->Directory =
FALSE;
685 AdPrint((
"UDFGetNetworkInformation: \n"));
700 PtrBuffer->ChangeTime =
Fcb->NTRequiredFCB->ChangeTime;
705 AdPrint((
"!!!!!!!! Bu-u-u-u-u-g !!!!!!!!!!!\n"));
706 AdPrint((
"!!!! UDFGetNetworkInformation to unopened file !!!!\n"));
713 if(!
FileInfo->Dloc->DirIndex)
AdPrint((
"*****!!!!! Directory has no DirIndex !!!!!*****\n"));
716 if(
Fcb->NTRequiredFCB->CommonFCBHeader.AllocationSize.LowPart == 0xffffffff) {
717 Fcb->NTRequiredFCB->CommonFCBHeader.AllocationSize.QuadPart =
720 PtrBuffer->AllocationSize =
Fcb->NTRequiredFCB->CommonFCBHeader.AllocationSize;
721 PtrBuffer->EndOfFile =
Fcb->NTRequiredFCB->CommonFCBHeader.FileSize;
727 if(!PtrBuffer->FileAttributes) {
759 AdPrint((
"UDFGetInternalInformation\n"));
773 AdPrint((
"!!!!!!!! Bu-u-u-u-u-g !!!!!!!!!!!\n"));
774 AdPrint((
"!!!! UDFGetInternalInformation to unopened file !!!!\n"));
810 AdPrint((
"UDFGetEaInformation\n"));
819 PtrBuffer->EaSize = 0;
846 AdPrint((
"UDFGetFullNameInformation\n"));
848 PtrBuffer->FileNameLength =
FileObject->FileName.Length;
851 if (PtrBuffer->FileNameLength +
sizeof(
ULONG ) > (
ULONG)(*PtrReturnedLength)) {
860 *PtrReturnedLength -=
sizeof(
ULONG ) + PtrBuffer->FileNameLength;
878 WCHAR ShortNameBuffer[13];
880 AdPrint((
"UDFGetAltNameInformation: \n"));
890 if(*PtrReturnedLength <
ShortName.Length) {
901 PtrBuffer->FileNameLength =
ShortName.Length;
919 PtrBuffer->CurrentByteOffset =
FileObject->CurrentByteOffset;
947 AdPrint((
"UDFGetFileStreamInformation\n"));
956 AdPrint((
"!!!!!!!! Bu-u-u-u-u-g !!!!!!!!!!!\n"));
957 AdPrint((
"!!!! UDFGetFileStreamInformation to unopened file !!!!\n"));
963 if(!(SDirInfo =
FileInfo->Dloc->SDirInfo) ||
985 PtrBuffer->NextEntryOffset =
l;
986 PtrBuffer->StreamNameLength = SDirIndex->
FName.
Length;
987 PtrBuffer->StreamSize = NTFileInfo->
EndOfFile;
990 *PtrReturnedLength -=
l;
991 *((
PCHAR*)(&PtrBuffer)) +=
l;
1007#ifndef UDF_READ_ONLY_BUILD
1022 AdPrint((
"UDFSetBasicInformation\n"));
1030 if(PtrBuffer->FileAttributes) {
1031 UDFUpdateAttrTime(
Fcb->
Vcb,
Fcb->FileInfo);
1035 ((
Fcb->FileInfo->Dloc->DataLoc.Modified ||
1036 Fcb->FileInfo->Dloc->AllocLoc.Modified ||
1038 Fcb->FileInfo->Dloc->FELoc.Modified))
1041 if(!PtrBuffer->CreationTime.QuadPart &&
1042 PtrBuffer->LastAccessTime.QuadPart &&
1043 !PtrBuffer->ChangeTime.QuadPart &&
1044 !PtrBuffer->LastWriteTime.QuadPart)
1049 &(PtrBuffer->CreationTime.QuadPart),
1050 &(PtrBuffer->LastAccessTime.QuadPart),
1051 &(PtrBuffer->ChangeTime.QuadPart),
1052 &(PtrBuffer->LastWriteTime.QuadPart) );
1054 if(PtrBuffer->CreationTime.QuadPart) {
1066 if(PtrBuffer->LastAccessTime.QuadPart) {
1071 if(PtrBuffer->ChangeTime.QuadPart) {
1072 Fcb->NTRequiredFCB->ChangeTime = PtrBuffer->ChangeTime;
1075 if(PtrBuffer->LastWriteTime.QuadPart) {
1082 if(PtrBuffer->FileAttributes) {
1107 Fcb->FCBFlags &= ~UDF_FCB_READ_ONLY;
1111 NULL, PtrBuffer->FileAttributes);
1158 !
Fcb->FileInfo->Dloc->SDirInfo ||
1171 SDirInfo->
Fcb->NTRequiredFCB) {
1193 FileInfo->Fcb->NTRequiredFCB->AcqFlushCount++;
1194 MmPrint((
" MmFlushImageSection() for Stream\n"));
1196 FileInfo->Fcb->NTRequiredFCB->AcqFlushCount--;
1199 FileInfo->Fcb->NTRequiredFCB->AcqFlushCount--;
1211 for(
i=2;
i<
d;
i++) {
1223#ifndef UDF_ALLOW_LINKS_TO_STREAMS
1233 AdPrint((
" SET stream DeleteOnClose\n"));
1244 AdPrint((
" CLEAR stream DeleteOnClose\n"));
1278 AdPrint((
" SET stream dir DeleteOnClose\n"));
1282 AdPrint((
" CLEAR stream dir DeleteOnClose\n"));
1353 AdPrint((
"UDFSetDispositionInformation\n"));
1358 AdPrint((
" CLEAR DeleteOnClose\n"));
1360 Fcb->FCBFlags &= ~UDF_FCB_DELETE_ON_CLOSE;
1366 AdPrint((
" SET DeleteOnClose\n"));
1409 MmPrint((
" MmFlushImageSection()\n"));
1410 Fcb->NTRequiredFCB->AcqFlushCount++;
1412 (lc > 1) ? MmFlushForWrite : MmFlushForDelete)) {
1413 Fcb->NTRequiredFCB->AcqFlushCount--;
1416 Fcb->NTRequiredFCB->AcqFlushCount--;
1470 AdPrint((
"UDFSetAllocationInformation\n"));
1489 if ((
FileObject->SectionObjectPointer->DataSectionObject !=
NULL) &&
1494 MmPrint((
" CcInitializeCacheMap()\n"));
1499 Fcb->NTRequiredFCB );
1501 CacheMapInitialized =
TRUE;
1505 if(
Fcb->NTRequiredFCB->CommonFCBHeader.AllocationSize.QuadPart <
1506 PtrBuffer->AllocationSize.QuadPart) {
1514 ModifiedAllocSize =
TRUE;
1516 }
else if(
Fcb->NTRequiredFCB->CommonFCBHeader.AllocationSize.QuadPart >
1517 PtrBuffer->AllocationSize.QuadPart) {
1524 MmPrint((
" MmCanFileBeTruncated()\n"));
1532 ModifiedAllocSize =
TRUE;
1533 TruncatedFile =
TRUE;
1544 if(ModifiedAllocSize) {
1554 if(
Fcb->NTRequiredFCB->CommonFCBHeader.ValidDataLength.QuadPart >
1555 PtrBuffer->AllocationSize.QuadPart) {
1557 Fcb->NTRequiredFCB->CommonFCBHeader.ValidDataLength =
1558 PtrBuffer->AllocationSize;
1560 if(
Fcb->NTRequiredFCB->CommonFCBHeader.FileSize.QuadPart >
1561 PtrBuffer->AllocationSize.QuadPart) {
1563 Fcb->NTRequiredFCB->CommonFCBHeader.FileSize =
1564 PtrBuffer->AllocationSize;
1569 Fcb->NTRequiredFCB->CommonFCBHeader.AllocationSize = PtrBuffer->AllocationSize;
1573 if(AcquiredPagingIo) {
1575 AcquiredPagingIo =
FALSE;
1589 MmPrint((
" CcSetFileSizes()\n"));
1590 Fcb->NTRequiredFCB->AcqFlushCount++;
1592 Fcb->NTRequiredFCB->AcqFlushCount--;
1610 if(AcquiredPagingIo) {
1612 AcquiredPagingIo =
FALSE;
1614 if (CacheMapInitialized) {
1616 MmPrint((
" CcUninitializeCacheMap()\n"));
1680 if ((
FileObject->SectionObjectPointer->DataSectionObject !=
NULL) &&
1685 MmPrint((
" CcInitializeCacheMap()\n"));
1690 Fcb->NTRequiredFCB );
1692 CacheMapInitialized =
TRUE;
1697 if(PtrSp->Parameters.SetFile.AdvanceOnly) {
1699 PtrBuffer->EndOfFile.QuadPart =
1700 min(PtrBuffer->EndOfFile.QuadPart,
1701 NtReqFcb->CommonFCBHeader.FileSize.QuadPart);
1705 PtrBuffer->EndOfFile.QuadPart)
1709 goto notify_size_changes;
1720 OldFileSize =
NtReqFcb->CommonFCBHeader.FileSize.QuadPart;
1721 if(OldFileSize < PtrBuffer->EndOfFile.QuadPart) {
1741 NtReqFcb->CommonFCBHeader.FileSize.QuadPart =
1743 PtrBuffer->EndOfFile.QuadPart;
1744 ModifiedAllocSize =
TRUE;
1746 }
else if(
NtReqFcb->CommonFCBHeader.FileSize.QuadPart >
1747 PtrBuffer->EndOfFile.QuadPart) {
1756 MmPrint((
" MmCanFileBeTruncated()\n"));
1774 ModifiedAllocSize =
TRUE;
1775 TruncatedFile =
TRUE;
1789 if(
NtReqFcb->CommonFCBHeader.ValidDataLength.QuadPart >
1790 PtrBuffer->EndOfFile.QuadPart) {
1792 NtReqFcb->CommonFCBHeader.ValidDataLength =
1793 PtrBuffer->EndOfFile;
1795 if(
NtReqFcb->CommonFCBHeader.FileSize.QuadPart >
1796 PtrBuffer->EndOfFile.QuadPart) {
1798 NtReqFcb->CommonFCBHeader.FileSize =
1799 PtrBuffer->EndOfFile;
1805 NtReqFcb->CommonFCBHeader.AllocationSize.QuadPart =
1806 PtrBuffer->EndOfFile.QuadPart;
1822 Ccb->CCBFlags &= ~UDF_CCB_ATTRIBUTES_SET;
1836 Fcb->NTRequiredFCB->AcqFlushCount++;
1838 Fcb->NTRequiredFCB->AcqFlushCount--;
1848 if(AcquiredPagingIo) {
1850 AcquiredPagingIo =
FALSE;
1868 if(AcquiredPagingIo) {
1870 AcquiredPagingIo =
FALSE;
1872 if (CacheMapInitialized) {
1874 MmPrint((
" CcUninitializeCacheMap()\n"));
1904 (*AcquiredVcb) =
FALSE;
1910 if(!HardLink && (Dir2 != Dir1))
1913#ifdef UDF_DELAYED_CLOSE
1933 (*SingleDir) = ((Dir1 == Dir2) && (Dir1->
Fcb));
1938 (*AcquiredVcb) =
TRUE;
1939 (*AcquiredVcbEx) =
TRUE;
1943 (*AcquiredVcb) =
TRUE;
1948 (*AcquiredDir1) =
TRUE;
1952 (*AcquiredFcb1) =
TRUE;
1970 PFILE_OBJECT DirObject1 = FileObject1->RelatedFileObject;
1972 PFILE_OBJECT DirObject2 = PtrSp->Parameters.SetFile.FileObject;
1975 PtrBuffer->ReplaceIfExists;
1998 ULONG FileInfoRefCount;
2002 AdPrint((
"UDFRename %8.8x\n", DirObject2));
2008#ifdef UDF_ALLOW_RENAME_MOVE
2009 if(!(File1 = Fcb1->FileInfo))
2020 DirObject2 = DirObject1;
2022 if(DirObject2->FsContext2 &&
2023 (Fcb2 = ((
PtrUDFCCB)(DirObject2->FsContext2))->Fcb)) {
2024 Dir2 = ((
PtrUDFCCB)(DirObject2->FsContext2))->
Fcb->FileInfo;
2033#ifdef UDF_ENABLE_SECURITY
2042 UDFPrint((
"TODO: We should remove Streams from source file\n"));
2055 &AcquiredDir1, &AcquiredFcb1,
2063 if(Fcb1->OpenHandleCount > 1)
2065 ASSERT(Fcb1->OpenHandleCount);
2066 ASSERT(!Fcb1->IrpContextLite);
2067 if(Fcb1->IrpContextLite) {
2071 if(Fcb1->CcbCount && !SingleDir) {
2078 Fcb1->FCBFlags &= ~UDF_FCB_POSTED_RENAME;
2100 Fcb1->FCBName->ObjectName.Buffer,
2115 RC = UDFDoesOSAllowFileToBeMoved__(File1);
2135 &(Dir2->
Fcb->FCBName->ObjectName) );
2140 RC = MyAppendUnicodeToString(&LocalPath,
L"\\");
2194 0 : Dir2->
Fcb->FCBName->ObjectName.Length) +
sizeof(
WCHAR),
2211 0 : Dir2->
Fcb->FCBName->ObjectName.Length) +
sizeof(
WCHAR),
2231 Link = Fcb1->NextCCB.Flink;
2233 FileInfoRefCount = 0;
2235 while (
Link != &(Fcb1->NextCCB)) {
2236 NextFileInfo = Dir1;
2243 AdPrint((
" Ccb:%x:%s:i:%x\n", CurCcb, UseClose ?
"Close" :
"",
i));
2245 for(;
i && NextFileInfo;
i--) {
2251 ASSERT_REF(NextFileInfo->Fcb->ReferenceCount >= NextFileInfo->RefCount);
2254 ASSERT_REF(NextFileInfo->Fcb->ReferenceCount > NextFileInfo->RefCount);
2255 ASSERT_REF(NextFileInfo->Fcb->ReferenceCount);
2256 ASSERT_REF(NextFileInfo->Fcb->NTRequiredFCB->CommonRefCount);
2259 ASSERT_REF(NextFileInfo->Fcb->ReferenceCount >= NextFileInfo->RefCount);
2278 Fcb1->ParentFcb = Dir2->
Fcb;
2292 if(Fcb1->FCBName->ObjectName.Buffer) {
2298 if(!(Fcb1->FCBName)) {
2305 AcquiredDir1 =
FALSE;
2310 AcquiredDir1 =
FALSE;
2325 RC = MyAppendUnicodeToString(&(Fcb1->FCBName->ObjectName),
L"\\");
2385 if(!
Vcb->FileIdCache)
return (-1);
2387 if(
Vcb->FileIdCache[
i].Id ==
Id)
return i;
2398 if(!
Vcb->FileIdCache) {
2405 if(!
Vcb->FileIdCache[
i].FullName.Buffer)
return i;
2432 Vcb->FileIdCache[
i].Id =
Id;
2460 if(!
Vcb->FileIdCache)
return;
2462 if(
Vcb->FileIdCache[
i].FullName.Buffer) {
2468 Vcb->FileIdCount = 0;
2482 (*FName) = &(
Vcb->FileIdCache[
i].FullName);
2483 (*CaseSens) = !(
Vcb->FileIdCache[
i].CaseSens);
2487#ifndef UDF_READ_ONLY_BUILD
2489#ifdef UDF_ALLOW_HARD_LINKS
2503 PFILE_OBJECT DirObject2 = PtrSp->Parameters.SetFile.FileObject;
2506 PtrBuffer->ReplaceIfExists;
2532 if(!(File1 = Fcb1->FileInfo))
2540#ifdef UDF_ALLOW_LINKS_TO_STREAMS
2552 DirObject2 = FileObject1->RelatedFileObject;
2554 if(DirObject2->FsContext2 &&
2555 (Fcb2 = ((
PtrUDFCCB)(DirObject2->FsContext2))->Fcb)) {
2556 Dir2 = ((
PtrUDFCCB)(DirObject2->FsContext2))->
Fcb->FileInfo;
2579 &AcquiredDir1, &AcquiredFcb1,
2602 Fcb1->FCBName->ObjectName.Buffer,
2624 &(Dir2->
Fcb->FCBName->ObjectName));
2631 RC = MyAppendUnicodeToString(&LocalPath,
L"\\");
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
VOID UDFSetFileXTime(IN PUDF_FILE_INFO FileInfo, IN LONGLONG *CrtTime, IN LONGLONG *AccTime, IN LONGLONG *AttrTime, IN LONGLONG *ChgTime)
VOID UDFAttributesToUDF(IN PDIR_INDEX_ITEM FileDirNdx, IN tag *FileEntry, IN ULONG NTAttr)
ULONG UDFAttributesToNT(IN PDIR_INDEX_ITEM FileDirNdx, IN tag *FileEntry)
NTSTATUS MyCloneUnicodeString(IN PUNICODE_STRING Str1, IN PUNICODE_STRING Str2)
NTSTATUS UDFFileDirInfoToNT(IN PVCB Vcb, IN PDIR_INDEX_ITEM FileDirNdx, OUT PFILE_BOTH_DIR_INFORMATION NTFileInfo)
int64 __fastcall UDFGetFreeSpace(IN PVCB Vcb)
BOOL Delete(LPCTSTR ServiceName)
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
ULONG UDFCleanUpFcbChain(IN PVCB Vcb, IN PUDF_FILE_INFO fi, IN ULONG TreeLength, IN BOOLEAN VcbAcquired)
PDIR_INDEX_HDR UDFGetDirIndexByFileInfo(IN PUDF_FILE_INFO FileInfo)
PDIR_INDEX_ITEM UDFDirIndexScan(PUDF_DIR_SCAN_CONTEXT Context, PUDF_FILE_INFO *_FileInfo)
BOOLEAN UDFDirIndexInitScan(IN PUDF_FILE_INFO DirInfo, OUT PUDF_DIR_SCAN_CONTEXT Context, IN uint_di Index)
#define NT_SUCCESS(StatCode)
#define FILE_ATTRIBUTE_NORMAL
void Replace(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LONG radius)
_In_ PIO_STACK_LOCATION IrpSp
NTSTATUS UDFExceptionHandler(PtrUDFIrpContext PtrIrpContext, PIRP Irp)
BOOLEAN UDFAcquireResourceExclusiveWithCheck(IN PERESOURCE Resource)
BOOLEAN __fastcall UDFIsIrpTopLevel(PIRP Irp)
VOID UDFLogEvent(NTSTATUS UDFEventLogId, NTSTATUS RC)
NTSTATUS UDFPostRequest(IN PtrUDFIrpContext PtrIrpContext, IN PIRP Irp)
PtrUDFIrpContext UDFAllocateIrpContext(PIRP Irp, PDEVICE_OBJECT PtrTargetDeviceObject)
VOID UDFReleaseIrpContext(PtrUDFIrpContext PtrIrpContext)
VOID __fastcall UDFReleaseObjectName(PtrUDFObjectName PtrObjectName)
long UDFExceptionFilter(PtrUDFIrpContext PtrIrpContext, PEXCEPTION_POINTERS PtrExceptionPointers)
PtrUDFObjectName UDFAllocateObjectName(VOID)
__inline VOID UDFNotifyFullReportChange(PVCB V, PUDF_FILE_INFO FI, ULONG E, ULONG A)
UNICODE_STRING * PUNICODE_STRING
#define UDFReleaseResource(Resource)
#define PsGetCurrentThread()
#define UDFConvertExclusiveToSharedLite(Resource)
#define UDFAcquireResourceShared(Resource, CanWait)
#define UDFAcquireResourceExclusive(Resource, CanWait)
#define UDFInterlockedDecrement(addr)
#define UDFInterlockedIncrement(addr)
#define UDF_ERROR_INTERNAL_ERROR
FAST_IO_POSSIBLE NTAPI UDFIsFastIoPossible(IN PtrUDFFCB Fcb)
IN PDCB IN POEM_STRING IN PUNICODE_STRING IN OUT POEM_STRING ShortName
NTSTATUS UDFRemoveFileId(IN PVCB Vcb, IN LONGLONG Id)
NTSTATUS UDFGetFileStreamInformation(IN PtrUDFFCB Fcb, IN PFILE_STREAM_INFORMATION PtrBuffer, IN OUT PLONG PtrReturnedLength)
NTSTATUS UDFGetEaInformation(PtrUDFIrpContext PtrIrpContext, IN PtrUDFFCB Fcb, IN PFILE_EA_INFORMATION PtrBuffer, IN OUT PLONG PtrReturnedLength)
NTSTATUS UDFSetBasicInformation(IN PtrUDFFCB Fcb, IN PtrUDFCCB Ccb, IN PFILE_OBJECT FileObject, IN PFILE_BASIC_INFORMATION PtrBuffer)
NTSTATUS UDFGetInternalInformation(PtrUDFIrpContext PtrIrpContext, IN PtrUDFFCB Fcb, IN PtrUDFCCB Ccb, IN PFILE_INTERNAL_INFORMATION PtrBuffer, IN OUT PLONG PtrReturnedLength)
LONG UDFFindFreeFileId(IN PVCB Vcb, IN LONGLONG Id)
NTSTATUS UDFSetAllocationInformation(IN PtrUDFFCB Fcb, IN PtrUDFCCB Ccb, IN PVCB Vcb, IN PFILE_OBJECT FileObject, IN PtrUDFIrpContext PtrIrpContext, IN PIRP Irp, IN PFILE_ALLOCATION_INFORMATION PtrBuffer)
NTSTATUS UDFPrepareForRenameMoveLink(PVCB Vcb, PBOOLEAN AcquiredVcb, PBOOLEAN AcquiredVcbEx, PBOOLEAN SingleDir, PBOOLEAN AcquiredDir1, PBOOLEAN AcquiredFcb1, IN PtrUDFCCB Ccb1, PUDF_FILE_INFO File1, PUDF_FILE_INFO Dir1, PUDF_FILE_INFO Dir2, BOOLEAN HardLink)
LONG UDFFindFileId(IN PVCB Vcb, IN LONGLONG Id)
NTSTATUS UDFSetEOF(IN PIO_STACK_LOCATION PtrSp, IN PtrUDFFCB Fcb, IN PtrUDFCCB Ccb, IN PVCB Vcb, IN PFILE_OBJECT FileObject, IN PIRP Irp, IN PFILE_END_OF_FILE_INFORMATION PtrBuffer)
NTSTATUS UDFGetBasicInformation(IN PFILE_OBJECT FileObject, IN PtrUDFFCB Fcb, IN PFILE_BASIC_INFORMATION PtrBuffer, IN OUT LONG *PtrReturnedLength)
NTSTATUS UDFCommonFileInfo(PtrUDFIrpContext PtrIrpContext, PIRP Irp)
NTSTATUS UDFGetFullNameInformation(IN PFILE_OBJECT FileObject, IN PFILE_NAME_INFORMATION PtrBuffer, IN OUT PLONG PtrReturnedLength)
NTSTATUS UDFMarkStreamsForDeletion(IN PVCB Vcb, IN PtrUDFFCB Fcb, IN BOOLEAN ForDel)
NTSTATUS UDFGetNetworkInformation(IN PtrUDFFCB Fcb, IN PFILE_NETWORK_OPEN_INFORMATION PtrBuffer, IN OUT PLONG PtrReturnedLength)
NTSTATUS UDFGetStandardInformation(IN PtrUDFFCB Fcb, IN PFILE_STANDARD_INFORMATION PtrBuffer, IN OUT LONG *PtrReturnedLength)
NTSTATUS UDFRename(IN PIO_STACK_LOCATION PtrSp, IN PtrUDFFCB Fcb1, IN PtrUDFCCB Ccb1, IN PFILE_OBJECT FileObject1, IN PFILE_RENAME_INFORMATION PtrBuffer)
NTSTATUS UDFStoreFileId(IN PVCB Vcb, IN PtrUDFCCB Ccb, IN PUDF_FILE_INFO fi, IN LONGLONG Id)
NTSTATUS UDFGetPositionInformation(IN PFILE_OBJECT FileObject, IN PFILE_POSITION_INFORMATION PtrBuffer, IN OUT PLONG PtrReturnedLength)
NTSTATUS UDFGetOpenParamsByFileId(IN PVCB Vcb, IN LONGLONG Id, OUT PUNICODE_STRING *FName, OUT BOOLEAN *CaseSens)
VOID UDFReleaseFileIdCache(IN PVCB Vcb)
NTSTATUS NTAPI UDFFileInfo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS UDFSetDispositionInformation(IN PtrUDFFCB Fcb, IN PtrUDFCCB Ccb, IN PVCB Vcb, IN PFILE_OBJECT FileObject, IN BOOLEAN Delete)
NTSTATUS UDFHardLink(IN PIO_STACK_LOCATION PtrSp, IN PtrUDFFCB Fcb1, IN PtrUDFCCB Ccb1, IN PFILE_OBJECT FileObject1, IN PFILE_LINK_INFORMATION PtrBuffer)
NTSTATUS UDFGetAltNameInformation(IN PtrUDFFCB Fcb, IN PFILE_NAME_INFORMATION PtrBuffer, IN OUT PLONG PtrReturnedLength)
VOID UDFFlushTryBreak(IN PVCB Vcb)
struct _FILE_BOTH_DIR_INFORMATION * PFILE_BOTH_DIR_INFORMATION
@ FilePositionInformation
@ FileEndOfFileInformation
@ FileInternalInformation
@ FileAlternateNameInformation
@ FileAllocationInformation
@ FileNetworkOpenInformation
@ FileDispositionInformation
struct _FILE_NETWORK_OPEN_INFORMATION FILE_NETWORK_OPEN_INFORMATION
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
struct _FILE_INTERNAL_INFORMATION FILE_INTERNAL_INFORMATION
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
#define FSRTL_FSP_TOP_LEVEL_IRP
#define FSRTL_CACHE_TOP_LEVEL_IRP
#define FSRTL_MOD_WRITE_TOP_LEVEL_IRP
#define FSRTL_FAST_IO_TOP_LEVEL_IRP
VOID NTAPI CcSetFileSizes(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes)
VOID NTAPI CcInitializeCacheMap(IN PFILE_OBJECT FileObject, IN PCC_FILE_SIZES FileSizes, IN BOOLEAN PinAccess, IN PCACHE_MANAGER_CALLBACKS Callbacks, IN PVOID LazyWriteContext)
BOOLEAN NTAPI CcUninitializeCacheMap(IN PFILE_OBJECT FileObject, IN OPTIONAL PLARGE_INTEGER TruncateSize, IN OPTIONAL PCACHE_UNINITIALIZE_EVENT UninitializeEvent)
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
struct _FILE_MODE_INFORMATION FILE_MODE_INFORMATION
struct _FILE_ALL_INFORMATION * PFILE_ALL_INFORMATION
struct _FILE_EA_INFORMATION FILE_EA_INFORMATION
struct _FILE_STREAM_INFORMATION FILE_STREAM_INFORMATION
#define FILE_STANDARD_INFORMATION
#define FILE_BASIC_INFORMATION
_In_ UINT _In_ UINT BytesToCopy
#define FILE_ATTRIBUTE_READONLY
#define FILE_DELETE_CHILD
struct _FILE_POSITION_INFORMATION FILE_POSITION_INFORMATION
struct _FILE_ALIGNMENT_INFORMATION FILE_ALIGNMENT_INFORMATION
#define FILE_ATTRIBUTE_ARCHIVE
#define FILE_ATTRIBUTE_DIRECTORY
struct _FILE_POSITION_INFORMATION * PFILE_POSITION_INFORMATION
#define FILE_ATTRIBUTE_TEMPORARY
VOID NTAPI FsRtlNotifyFullReportChange(IN PNOTIFY_SYNC NotifySync, IN PLIST_ENTRY NotifyList, IN PSTRING FullTargetName, IN USHORT TargetNameOffset, IN PSTRING StreamName OPTIONAL, IN PSTRING NormalizedParentName OPTIONAL, IN ULONG FilterMatch, IN ULONG Action, IN PVOID TargetContext)
VOID NTAPI FsRtlNotifyFullChangeDirectory(IN PNOTIFY_SYNC NotifySync, IN PLIST_ENTRY NotifyList, IN PVOID FsContext, IN PSTRING FullDirectoryName, IN BOOLEAN WatchTree, IN BOOLEAN IgnoreBuffer, IN ULONG CompletionFilter, IN PIRP NotifyIrp, IN PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback OPTIONAL, IN PSECURITY_SUBJECT_CONTEXT SubjectContext OPTIONAL)
#define IoCompleteRequest
PIRP NTAPI IoGetTopLevelIrp(VOID)
VOID NTAPI IoSetTopLevelIrp(IN PIRP Irp)
NTSTATUS NTAPI IoCheckFunctionAccess(IN ACCESS_MASK GrantedAccess, IN UCHAR MajorFunction, IN UCHAR MinorFunction, IN ULONG IoControlCode, IN PVOID ExtraData OPTIONAL, IN PVOID ExtraData2 OPTIONAL)
#define STATUS_USER_MAPPED_FILE
#define FileStandardInformation
NTSTATUS UDFCheckAccessRights(PFILE_OBJECT FileObject, PACCESS_STATE AccessState, PtrUDFFCB Fcb, PtrUDFCCB Ccb, ACCESS_MASK DesiredAccess, USHORT ShareAccess)
#define UDFRemoveFromSystemDelayedQueue(Fcb)
#define UDFRemoveFromDelayedQueue(Fcb)
#define UDFCloseAllDelayedInDir(Vcb, FI)
#define _SEH2_AbnormalTermination()
#define _SEH2_EXCEPT(...)
#define _SEH2_GetExceptionInformation()
#define IRP_MJ_SET_INFORMATION
#define IRP_MJ_QUERY_INFORMATION
BOOLEAN NTAPI MmCanFileBeTruncated(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer, _In_opt_ PLARGE_INTEGER NewFileSize)
BOOLEAN NTAPI MmFlushImageSection(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN MMFLUSH_TYPE FlushType)
#define STATUS_CANNOT_DELETE
#define STATUS_BUFFER_OVERFLOW
#define UDF_FCB_READ_ONLY
#define UDF_CCB_CREATE_TIME_SET
#define UDF_FCB_PAGE_FILE
#define UDF_CCB_ATTRIBUTES_SET
#define UDF_IRP_CONTEXT_CAN_BLOCK
#define UDF_FCB_POSTED_RENAME
struct _UDFContextControlBlock * PtrUDFCCB
#define UDF_CCB_ACCESS_TIME_SET
#define UDF_CCB_CASE_SENSETIVE
#define UDF_FCB_ROOT_DIRECTORY
#define UDF_NTREQ_FCB_DELETED
#define UDF_NODE_TYPE_FCB
#define UDF_CCB_MODIFY_TIME_SET
#define UDF_NTREQ_FCB_MODIFIED
#define UDF_NODE_TYPE_VCB
#define UDF_FCB_DELETE_ON_CLOSE
#define UDF_FCB_DIRECTORY
#define UDF_FCB_DELETE_PARENT
#define UDF_CCB_WRITE_TIME_SET
ULONG AlignmentRequirement
struct _UDF_FILE_INFO * FileInfo
struct _FCB::@729::@732 Fcb
ERESOURCE PagingIoResource
LARGE_INTEGER LastWriteTime
LARGE_INTEGER LastAccessTime
PDEVICE_OBJECT DeviceObject
struct _IO_STACK_LOCATION::@3974::@3984 SetFile
struct _IO_STACK_LOCATION::@3974::@3983 QueryFile
union _IO_STACK_LOCATION::@1575 Parameters
UNICODE_STRING UnicodeStrRoot
UNICODE_STRING ObjectName
struct _UDFFileControlBlock * Fcb
struct _UDF_FILE_INFO * ParentFile
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define FILE_ID_CACHE_GRANULARITY
#define UDF_VCB_FLAGS_VOLUME_READ_ONLY
#define UDF_VCB_FLAGS_RAW_DISK
#define UDF_VCB_IC_UPDATE_ARCH_BIT
#define UDF_VCB_IC_UPDATE_UCHG_DIR_ACCESS_TIME
#define UDF_VCB_IC_UPDATE_DIR_WRITE
#define UDF_VCB_SKIP_EJECT_CHECK
OSSTATUS UDFHardLinkFile__(IN PVCB Vcb, IN BOOLEAN IgnoreCase, IN OUT BOOLEAN *Replace, IN PUNICODE_STRING fn, IN OUT PUDF_FILE_INFO DirInfo1, IN OUT PUDF_FILE_INFO DirInfo2, IN OUT PUDF_FILE_INFO FileInfo)
OSSTATUS UDFRenameMoveFile__(IN PVCB Vcb, IN BOOLEAN IgnoreCase, IN OUT BOOLEAN *Replace, IN PUNICODE_STRING fn, IN OUT PUDF_FILE_INFO DirInfo1, IN OUT PUDF_FILE_INFO DirInfo2, IN OUT PUDF_FILE_INFO FileInfo)
uint16 UDFGetFileLinkCount(IN PUDF_FILE_INFO FileInfo)
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 UDFOpenStreamDir__(IN PVCB Vcb, IN PUDF_FILE_INFO FileInfo, OUT PUDF_FILE_INFO *_SDirInfo)
void UDFSetFileSizeInDirNdx(IN PVCB Vcb, IN PUDF_FILE_INFO FileInfo, IN int64 *ASize)
int64 UDFGetFileSizeFromDirNdx(IN PVCB Vcb, IN PUDF_FILE_INFO FileInfo)
OSSTATUS UDFResizeFile__(IN PVCB Vcb, IN OUT PUDF_FILE_INFO FileInfo, IN int64 NewLength)
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 UDFIsSDirDeleted(FI)
#define UDFReferenceFile__(fi)
#define UDFHasAStreamDir(FI)
#define UDFIsDirOpened__(fi)
#define UDFIsDeleted(DirNdx)
#define UDFIsDirEmpty__(fi)
__inline PDIR_INDEX_ITEM UDFDirIndex(IN PDIR_INDEX_HDR hDirNdx, IN uint_di i)
__inline OSSTATUS UDFFindFile__(IN PVCB Vcb, IN BOOLEAN IgnoreCase, IN PUNICODE_STRING Name, IN PUDF_FILE_INFO DirInfo)
#define UDFIsAStreamDir(FI)
#define UDFDOSName__(Vcb, DosName, UdfName, FileInfo)
#define UDFDirIndexGetLastIndex(di)
#define UDFReferenceFileEx__(fi, i)
#define UDFIsADirectory(FileInfo)
#define UDF_FI_FLAG_FI_INTERNAL
Given entry represents the file used for internal FS purposes & must be invisible.
#define UDF_FE_FLAG_FE_MODIFIED
Was modified & should be flushed.
#define UDF_FI_FLAG_SYS_ATTR
Given entry of file list contains valid file attributes & times in NT-specific format.
#define STATUS_DIRECTORY_NOT_EMPTY
#define STATUS_DRIVER_INTERNAL_ERROR
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_FILE_DELETED
#define STATUS_OBJECT_NAME_INVALID
#define STATUS_INSUFFICIENT_RESOURCES
#define UDFInterlockedExchangeAdd(addr, i)
#define UDF_CHECK_PAGING_IO_RESOURCE(NTReqFCB)
static int Link(const char **args)
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
#define FILE_ACTION_MODIFIED_STREAM
#define FILE_NOTIFY_CHANGE_SIZE
#define FILE_ACTION_MODIFIED
#define FO_TEMPORARY_FILE
#define FILE_ACTION_RENAMED_OLD_NAME
#define FILE_NOTIFY_CHANGE_LAST_ACCESS
#define FILE_NOTIFY_CHANGE_ATTRIBUTES
#define FILE_ACTION_REMOVED
#define FILE_NOTIFY_CHANGE_FILE_NAME
#define FO_CLEANUP_COMPLETE
#define FILE_NOTIFY_CHANGE_STREAM_SIZE
#define FILE_ACTION_RENAMED_NEW_NAME
#define FO_FILE_SIZE_CHANGED
#define IO_DISK_INCREMENT
#define FO_NO_INTERMEDIATE_BUFFERING
#define FILE_NOTIFY_CHANGE_CREATION
#define FILE_NOTIFY_CHANGE_LAST_WRITE
#define FILE_NOTIFY_CHANGE_EA
#define FILE_ACTION_ADDED
#define FILE_NOTIFY_CHANGE_DIR_NAME
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE _In_opt_ PVOID _Out_ PIO_STATUS_BLOCK _In_ ULONG NotifyFilter
_In_ PUNICODE_STRING NewName