25 #define XCHG_DD(a,b) \ 28 PULONG _from_, _to_; \ 29 _from_ = ((PULONG)&(b)); \ 30 _to_ = ((PULONG)&(a)); \ 36 #define UDF_BUG_CHECK_ID UDF_FILE_UDF_INFO_MOUNT 46 #ifndef UDF_READ_ONLY_BUILD 70 if(!(XSpaceBitmap->extLength)) {
81 LBS =
Vcb->LBlockSize;
87 switch (XSpaceBitmap->extLength >> 30) {
90 *XSl =
min(XSpaceBitmap->extLength, *XSl);
91 TmpExt.
extLength = XSpaceBitmap->extLength = *XSl;
97 XSBMExtInfo->Offset = 0;
98 XSBMExtInfo->Length = *XSl;
107 if(XSBMExtInfo->Mapping[1].extLength) {
108 UDFPrint((
"Can't allocate space for Freed Space bitmap\n"));
111 *XSl = (
uint32)(XSBMExtInfo->Length);
112 XSpaceBitmap->extPosition =
UDFPhysLbaToPart(
Vcb, PartNum, XSBMExtInfo->Mapping[0].extLocation);
120 TmpExt.
extLength = XSpaceBitmap->extLength = *XSl;
126 XSBMExtInfo->Offset = 0;
127 XSBMExtInfo->Length = *XSl;
137 switch (XSpaceBitmap->extLength >> 30) {
148 if(XSBMExtInfo->Mapping) {
150 XSBMExtInfo->Mapping =
NULL;
172 XSpaceBitmap->extLength = (*XSl + LBS -1) & ~(LBS-1);
193 uint32 plen, pstart, pend;
221 new_bm =
Vcb->FSBM_Bitmap;
222 old_bm =
Vcb->FSBM_OldBitmap;
223 bad_bm =
Vcb->BSBM_Bitmap;
228 if(USl && USBMExtInfo.
Mapping) {
238 if(FSl && FSBMExtInfo.
Mapping) {
250 pend =
min(pstart + plen,
Vcb->FSBM_BitCount);
255 for(
i=pstart;
i<pend;
i++) {
263 for(
i=pstart;
i<pend;
i+=
d) {
309 for(
i=0;
i<
Vcb->PartitionMaps;
i++)
321 UDFPrint((
"unallocatedSpaceTable (part %d)\n",
i));
325 UDFPrint((
"freedSpaceTable (part %d)\n",
i));
384 UDFPrint((
"UDF: Updating LVID @%x (%x)\n",
Vcb->LVid_loc.extLocation,
Vcb->LVid_loc.extLength));
422 partFreeSpace = (
uint32*)(lvid+1);
426 partFreeSpace[
i] = pSize;
477 UDFPrint((
"UDF: Updating Sparable Part Map:\n"));
481 BC = (
Vcb->SparingTableLength >>
Vcb->BlockSizeBits) + 1;
486 RelocMap =
Vcb->SparingTable;
491 for(
i=1;
i<
Vcb->SparingCount;
i++) {
492 if(RelocMap[
i-1].origLocation > RelocMap[
i].origLocation) {
493 XCHG_DD(RelocMap[
i-1].origLocation, RelocMap[
i].origLocation);
495 XCHG_DD(RelocMap[
i-1].mappedLocation, RelocMap[
i].mappedLocation);
501 RelocMap[
i-1].mappedLocation > RelocMap[
i].mappedLocation) {
507 for(
i=0;
i<
Vcb->SparingCount;
i++) {
509 RelocMap[
i].origLocation, RelocMap[
i].mappedLocation));
520 for(
i=0;
i<
Vcb->SparingTableCount;
i++) {
522 UDFPrint((
" sparing table @%x\n",
Vcb->SparingTableLoc[
i]));
530 >>
Vcb->BlockSizeBits);
532 UDFPrint((
" sizeSparingTable @%x too long: %x > %x\n",
533 Vcb->SparingTableLoc[
i], BC2, BC
541 UDFPrint((
" Error reading sizeSparingTable @%x (%x)\n",
542 Vcb->SparingTableLoc[
i], BC2
550 >>
Vcb->BlockSizeBits);
552 UDFPrint((
" new sizeSparingTable @%x too long: %x > %x\n",
553 Vcb->SparingTableLoc[
i], BC2, BC
558 SparTable->reallocationTableLen = (
USHORT)
Vcb->SparingCount;
577 UDFPrint((
"UDF: record updated\n"));
605 #define CUR_IDENT_SZ (sizeof(lvd->logicalVolIdent)) 625 UDFPrint((
"UDF: Updating LVD @%x (%x)\n", Lba.block,
Vcb->BlockSize));
654 lvd->descTag.tagSerialNum --;
753 #endif //UDF_READ_ONLY_BUILD 795 #ifndef UDF_READ_ONLY_BUILD 807 #define CUR_IDENT_SZ (sizeof(pvoldesc->volIdent)) 816 UDFPrint((
"UDF: Updating PVD @%x (%x)\n", Lba.block,
Vcb->BlockSize));
844 pvoldesc->descTag.tagSerialNum --;
854 #endif //UDF_READ_ONLY_BUILD 863 uint32 plen, pstart, pend;
869 UDFPrint((
"UDFUpdateNonAllocated:\n"));
870 if(!
Vcb->NonAllocFileInfo) {
873 if(!(bad_bm =
Vcb->BSBM_Bitmap)) {
877 DataLoc = &(
Vcb->NonAllocFileInfo->Dloc->DataLoc);
879 if(
Vcb->NonAllocFileInfo->Dloc->DataLoc.Offset) {
880 UDFPrint((
"NonAllocFileInfo in IN_ICB mode !!!\n"));
886 pend =
min(pstart + plen,
Vcb->FSBM_BitCount);
889 for(
i=pstart;
i<pend;
i++) {
895 UDFPrint((
"lba %#x is already in NonAllocFileInfo\n",
i));
898 UDFPrint((
"add lba %#x to NonAllocFileInfo\n",
i));
900 Ext.extLength =
Vcb->LBlockSize;
902 Ext.extLocation =
i & ~((1<<
Vcb->LB2B_Bits) - 1);
913 UDFPrint((
"UDFUpdateNonAllocated: done\n"));
925 #ifndef UDF_READ_ONLY_BUILD 944 if(
Vcb->VerifyOnWrite) {
945 UDFPrint((
"UDF: Flushing cache for verify\n"));
959 UDFPrint((
"Error updating VolIdent (1)\n"));
961 UDFPrint((
"Error updating VolIdent (2)\n"));
977 UDFPrint((
"Error updating Main VDS\n"));
979 UDFPrint((
"Error updating Reserve VDS\n"));
998 #endif //UDF_READ_ONLY_BUILD 1030 Vcb->Anchor[0] = 256 +
Vcb->FirstLBALastSes;
1031 Vcb->Anchor[1] = 512 +
Vcb->FirstLBALastSes;
1032 Vcb->Anchor[2] = 256 +
Vcb->TrackMap[
Vcb->LastTrackNum].FirstLba;
1033 Vcb->Anchor[3] = 512 +
Vcb->TrackMap[
Vcb->LastTrackNum].FirstLba;
1034 Vcb->Anchor[4] =
Vcb->LastLBA - 256;
1035 Vcb->Anchor[5] =
Vcb->LastLBA - 256 + 1;
1036 Vcb->Anchor[6] =
Vcb->LastLBA - 256 - 2;
1038 Vcb->Anchor[7] =
Vcb->LastLBA - 2;
1039 Vcb->Anchor[8] =
Vcb->LastLBA;
1040 Vcb->Anchor[9] =
Vcb->LastLBA - 512;
1047 for (
i=0;
i<
sizeof(
Vcb->Anchor)/
sizeof(
int);
i++) {
1048 if(
Vcb->Anchor[
i] >
Vcb->LastLBA)
1050 MRW_candidate =
FALSE;
1051 if(
Vcb->Anchor[
i]) {
1057 if(!IsMRW && (
i<2) &&
1062 UDFPrint((
"UDF: looks like we have MRW....\n"));
1063 MRW_candidate =
TRUE;
1064 goto MRW_workaround;
1070 UDFPrint((
"UDF: disk seems to be incomplete\n"));
1079 UDFPrint((
"UDF: Found AVD at %x (point %d)\n",
Vcb->Anchor[
i],
i));
1081 LastBlock =
Vcb->LastLBA;
1083 UDFPrint((
"UDF: looks like we _*really*_ have MRW....\n"));
1088 UDFPrint((
"UDF: MRW on non-MRW drive => ReadOnly"));
1099 UDFPrint((
"UDF: -----------------\nUDF: Last block %x\n",LastBlock));
1142 UDFPrint((
"UDF: ISO9660 Boot Record found\n"));
1145 UDFPrint((
"UDF: ISO9660 Primary Volume Descriptor found\n"));
1148 UDFPrint((
"UDF: ISO9660 Supplementary Volume Descriptor found\n"));
1151 UDFPrint((
"UDF: ISO9660 Volume Partition Descriptor found\n"));
1154 UDFPrint((
"UDF: ISO9660 Volume Descriptor Set Terminator found\n"));
1203 UDFPrint((
"UDF: PrimaryVolDesc:\n"));
1209 #define CUR_IDENT_SZ (sizeof(pvoldesc->volIdent)) 1210 if (
Vcb->VolIdent.Buffer) {
1215 UDFPrint((
"volIdent[] = '%ws'\n",
Vcb->VolIdent.Buffer));
1225 #define CUR_IDENT_SZ (sizeof(pvoldesc->volSetIdent)) 1272 switch(
Vcb->PartitialDamagedVolumeAction) {
1274 UDFPrint((
"UDF: Switch to r/o mode.\n"));
1280 UDFPrint((
"UDF: Switch to raw mount mode, return UNRECOGNIZED_VOLUME.\n"));
1286 UDFPrint((
"UDF: Keep r/w mode for your own risk.\n"));
1314 Vcb->LVid->nextIntegrityExt.extLength) {
1317 loc =
Vcb->LVid->nextIntegrityExt;
1328 Vcb->origIntegrityType =
1329 Vcb->IntegrityType =
Vcb->LVid->integrityType;
1330 Vcb->LVid_loc = loc;
1338 UDFPrint((
" Type: %s\n",!
Vcb->IntegrityType ?
"Open" :
"Close"));
1354 UDFPrint((
" Target FS requires: %x Revision => ReadOnly\n",
Vcb->minUDFWriteRev));
1385 UDFPrint((
"UDF: LogicalVolDesc\n"));
1387 if(!(
Vcb->Partitions)) {
1390 if(!
Vcb->Partitions)
1403 if(
Vcb->LBlockSize <
Vcb->BlockSize)
1405 switch(
Vcb->LBlockSize) {
1406 case 512:
Vcb->LBlockSizeBits = 9;
break;
1407 case 1024:
Vcb->LBlockSizeBits = 10;
break;
1408 case 2048:
Vcb->LBlockSizeBits = 11;
break;
1409 case 4096:
Vcb->LBlockSizeBits = 12;
break;
1410 case 8192:
Vcb->LBlockSizeBits = 13;
break;
1411 case 16384:
Vcb->LBlockSizeBits = 14;
break;
1412 case 32768:
Vcb->LBlockSizeBits = 15;
break;
1413 case 65536:
Vcb->LBlockSizeBits = 16;
break;
1415 UDFPrint((
"UDF: Bad block size (%ld)\n",
Vcb->LBlockSize));
1418 UDFPrint((
"UDF: logical block size (%ld)\n",
Vcb->LBlockSize));
1419 Vcb->LB2B_Bits =
Vcb->LBlockSizeBits -
Vcb->BlockSizeBits;
1463 UDFPrint((
"Load sparing table\n"));
1470 UDFPrint((
"Found metadata partition\n"));
1489 UDFPrint((
"FileSet found in LogicalVolDesc at block=%x, partition=%d\n",
1510 UDFPrint((
"UDF: Bogus LogicalVolDesc\n"));
1512 if(!(
Vcb->Partitions)) {
1513 Vcb->PartitionMaps = 1;
1515 if(!
Vcb->Partitions)
1518 if(
Vcb->PartitionMaps != 1)
1521 UDFPrint((
"UDF: volDescSeqNum = %x\n", 0));
1523 Vcb->LBlockSize = 2048;
1528 if(
Vcb->LBlockSize <
Vcb->BlockSize)
1530 Vcb->LBlockSizeBits = 11;
1531 UDFPrint((
"UDF: logical block size (%ld)\n",
Vcb->LBlockSize));
1532 Vcb->LB2B_Bits =
Vcb->LBlockSizeBits -
Vcb->BlockSizeBits;
1533 UDFPrint((
"UDF: mapTableLength = %x\n", 0));
1534 UDFPrint((
"UDF: numPartitionMaps = %x\n", 0));
1539 Vcb->Partitions[0].VolumeSeqNum = 0;
1540 Vcb->Partitions[0].PartitionNum = 0;
1558 UDFPrint((
"FileSet found in LogicalVolDesc at block=%x, partition=%d\n",
1588 UDFPrint((
"UDFAddXSpaceBitmap: at block=%x, partition=%d\n",
1594 flags = bm->extLength >> 30;
1621 l2 =
l <<
Vcb->LB2B_Bits;
1625 for(
k=0;(
k<l2) && (
i<lim);
k++) {
1639 for(
k=0;(
k<l2) && (
i<lim);
k++) {
1688 UDFPrint((
" UDFVerifyXSpaceBitmap: part %x\n", PartNum));
1692 flags = bm->extLength >> 30;
1838 UDFPrint((
"UDFVerifyFreeSpaceBitmap:\n"));
1892 UDFPrint((
"Broken unallocated space descriptor sequence\n"));
1926 if(!(
Vcb->FSBM_Bitmap)) {
1932 if(!(
Vcb->ZSBM_Bitmap)) {
1933 #ifdef UDF_TRACK_ONDISK_ALLOCATION_OWNERS 1935 #endif //UDF_TRACK_ONDISK_ALLOCATION_OWNERS 1943 #ifdef UDF_TRACK_ONDISK_ALLOCATION_OWNERS 1945 if(!(
Vcb->FSBM_Bitmap_owners)) {
1951 #endif //UDF_TRACK_ONDISK_ALLOCATION_OWNERS 1952 Vcb->FSBM_ByteCount =
i;
1953 Vcb->FSBM_BitCount =
Vcb->LastPossibleLBA+1;
2007 UDFPrint((
"Broken unallocated space descriptor sequence\n"));
2033 UDFPrint((
" volDescSeqNum = %x\n",
p->volDescSeqNum));
2034 UDFPrint((
" partitionFlags = %x\n",
p->partitionFlags));
2035 UDFPrint((
" partitionNumber = %x\n",
p->partitionNumber));
2036 UDFPrint((
" accessType = %x\n",
p->accessType));
2037 UDFPrint((
" partitionStartingLocation = %x\n",
p->partitionStartingLocation));
2038 UDFPrint((
" partitionLength = %x\n",
p->partitionLength));
2041 for (
i=0;
i<
Vcb->PartitionMaps;
i++) {
2042 UDFPrint((
"Searching map: (%d == %d)\n",
2043 Vcb->Partitions[
i].PartitionNum, (
p->partitionNumber) ));
2044 if(
Vcb->Partitions[
i].PartitionNum == (
p->partitionNumber)) {
2046 Vcb->Partitions[
i].PartitionRoot =
p->partitionStartingLocation +
Vcb->FirstLBA;
2047 Vcb->Partitions[
i].PartitionLen =
p->partitionLength;
2048 Vcb->Partitions[
i].UspaceBitmap = 0xFFFFFFFF;
2049 Vcb->Partitions[
i].FspaceBitmap = 0xFFFFFFFF;
2050 Vcb->Partitions[
i].AccessType =
p->accessType;
2051 UDFPrint((
"Access mode %x\n",
p->accessType));
2057 UDFPrint((
"Soft Read-only volume\n"));
2072 UDFPrint((
"unallocatedSpaceTable (part %d)\n",
i));
2075 Vcb->Partitions[
i].UspaceBitmap =
2077 UDFPrint((
"unallocatedSpaceBitmap (part %d) @ %x\n",
2078 i,
Vcb->Partitions[
i].UspaceBitmap ));
2082 UDFPrint((
"partitionIntegrityTable (part %d)\n",
i));
2084 UDFPrint((
"freedSpaceTable (part %d)\n",
i));
2087 Vcb->Partitions[
i].FspaceBitmap =
2089 UDFPrint((
"freedSpaceBitmap (part %d)\n",
i));
2105 Vcb->LastModifiedTrack = 0;
2112 UDFPrint((
"Partition (%d) not found in partition map\n", (
p->partitionNumber) ));
2114 UDFPrint((
"Partition (%d:%d type %x) starts at physical %x, length %x\n",
2115 p->partitionNumber,
i-1,
Vcb->Partitions[
i-1].PartitionType,
2116 Vcb->Partitions[
i-1].PartitionRoot,
Vcb->Partitions[
i-1].PartitionLen));
2135 UDFPrint((
"UDF: Verify Part Descr:\n"));
2136 UDFPrint((
" volDescSeqNum = %x\n",
p->volDescSeqNum));
2137 UDFPrint((
" partitionFlags = %x\n",
p->partitionFlags));
2138 UDFPrint((
" partitionNumber = %x\n",
p->partitionNumber));
2139 UDFPrint((
" accessType = %x\n",
p->accessType));
2140 UDFPrint((
" partitionStartingLocation = %x\n",
p->partitionStartingLocation));
2141 UDFPrint((
" partitionLength = %x\n",
p->partitionLength));
2144 for (
i=0;
i<
Vcb->PartitionMaps;
i++) {
2145 UDFPrint((
"Searching map: (%d == %d)\n",
2146 Vcb->Partitions[
i].PartitionNum, (
p->partitionNumber) ));
2147 if(
Vcb->Partitions[
i].PartitionNum == (
p->partitionNumber)) {
2149 if(
Vcb->Partitions[
i].PartitionRoot !=
p->partitionStartingLocation +
Vcb->FirstLBA)
2151 if(
Vcb->Partitions[
i].PartitionLen !=
2152 min(
p->partitionLength,
2153 Vcb->LastPossibleLBA -
Vcb->Partitions[
i].PartitionRoot))
2157 if(
Vcb->Partitions[
i].AccessType !=
p->accessType)
2159 UDFPrint((
"Access mode %x\n",
p->accessType));
2166 UDFPrint((
"Soft Read-only volume\n"));
2181 UDFPrint((
"unallocatedSpaceTable (part %d)\n",
i));
2184 if(
Vcb->Partitions[
i].UspaceBitmap ==
2186 UDFPrint((
"Warning: both USpaceBitmaps have same location\n"));
2188 UDFPrint((
"unallocatedSpaceBitmap (part %d) @ %x\n",
2189 i,
Vcb->Partitions[
i].UspaceBitmap ));
2193 UDFPrint((
"partitionIntegrityTable (part %d)\n",
i));
2195 UDFPrint((
"freedSpaceTable (part %d)\n",
i));
2198 if(
Vcb->Partitions[
i].FspaceBitmap ==
2200 UDFPrint((
"Warning: both FSpaceBitmaps have same location\n"));
2202 UDFPrint((
"freedSpaceBitmap (part %d)\n",
i));
2225 UDFPrint((
"Partition (%d) not found in partition map\n", (
p->partitionNumber) ));
2227 UDFPrint((
"Partition (%d:%d type %x) starts at physical %x, length %x\n",
2228 p->partitionNumber,
i-1,
Vcb->Partitions[
i-1].PartitionType,
2229 Vcb->Partitions[
i-1].PartitionRoot,
Vcb->Partitions[
i-1].PartitionLen));
2255 for (;(!done &&
block <= lastblock);
block++)
2283 UDFPrint((
"too long multipart VDS -> abort\n"));
2337 UDFPrint((
"UDF: Imp Use Vol Desc:\n"));
2339 UDFPrint((
"UDF: Imp Use Vol Desc Imp Use:\n"));
2351 UDFPrint((
"UDF: Unallocated Space Desc:\n"));
2394 if(!
Vcb->PVolDescAddr.block) {
2395 Vcb->PVolDescAddr = vds[
i];
2397 Vcb->PVolDescAddr2 = vds[
i];
2546 *
root = fset->rootDirectoryICB.extLocation;
2547 Vcb->SerialNumber = fset->descTag.tagSerialNum;
2548 UDFPrint((
"Rootdir at block=%x, partition=%d\n",
2549 root->logicalBlockNum,
root->partitionReferenceNum));
2551 *sysstream = fset->streamDirectoryICB.extLocation;
2552 UDFPrint((
"SysStream at block=%x, partition=%d\n",
2553 sysstream->logicalBlockNum, sysstream->partitionReferenceNum));
2555 #define CUR_IDENT_SZ (sizeof(fset->logicalVolIdent)) 2556 if (
Vcb->VolIdent.Buffer) {
2561 UDFPrint((
"volIdent[] = '%ws'\n",
Vcb->VolIdent.Buffer));
2577 for(
j=0;
j<
Vcb->BadSeqLocIndex;
j++) {
2578 if(
Vcb->BadSeqLoc[
j] == Lba) {
2579 RC =
Vcb->BadSeqStatus[
j];
2597 j =
Vcb->BadSeqLocIndex;
2598 Vcb->BadSeqLocIndex++;
2599 Vcb->BadSeqLoc[
j] = Lba;
2600 Vcb->BadSeqStatus[
j] = RC;
2619 uint32 reserve_s, reserve_e;
2634 main_e = main_e >>
Vcb->BlockSizeBits;
2640 reserve_e = reserve_e >>
Vcb->BlockSizeBits;
2641 reserve_e += reserve_s;
2648 UDFPrint((
"-----------------------------------\n"));
2649 UDFPrint((
"UDF: Main sequence:\n"));
2657 UDFPrint((
"-----------------------------------\n"));
2658 UDFPrint((
"UDF: Main sequence failed.\n"));
2659 UDFPrint((
"UDF: Reserve sequence\n"));
2669 UDFPrint((
"-----------------------------------\n"));
2670 Vcb->VDS2_Len = reserve_e - reserve_s;
2671 Vcb->VDS2 = reserve_s;
2683 Vcb->VDS1_Len = main_e - main_s;
2689 UDFPrint((
"-----------------------------------\n"));
2690 Vcb->VDS2_Len = reserve_e - reserve_s;
2691 Vcb->VDS2 = reserve_s;
2694 UDFPrint((
"UDF: Reserve sequence verification failed.\n"));
2695 switch(
Vcb->PartitialDamagedVolumeAction) {
2697 UDFPrint((
"UDF: Switch to r/o mode.\n"));
2701 UDFPrint((
"UDF: Switch to raw mount mode, return UNRECOGNIZED_VOLUME.\n"));
2707 UDFPrint((
"UDF: Keep r/w mode for your own risk.\n"));
2716 if(
Vcb->SparingCount &&
2718 UDFPrint((
"UDF: No free Sparing Entries -> Switch to r/o mode.\n"));
2722 if(
i ==
sizeof(
Vcb->Anchor)/
sizeof(
int)) {
2723 UDFPrint((
"No Anchor block found\n"));
2727 UDFPrint((
"Using anchor in block %x\n",
Vcb->Anchor[
i]));
2746 uint32 relLocExt = Addr->logicalBlockNum;
2749 uint32 relPrevExt, prevExt;
2751 relPrevExt, prevExt =
NULL;
2752 FileSetDesc->nextExt.extLength = 1;
2755 while(FileSetDesc->nextExt.extLength) {
2758 FileSetDesc->nextExt.extLength = 0;
2772 relPrevExt = relLocExt;
2796 #ifdef UDF_TRACK_FS_STRUCTURES 2798 #endif //UDF_TRACK_FS_STRUCTURES 2802 Vcb->SparingCountFree = -1;
2804 UDFPrint((
"UDF: Sparable Part Map:\n"));
2805 Vcb->SparingTableLength = PartMap->sizeSparingTable;
2806 BC = (PartMap->sizeSparingTable >>
Vcb->BlockSizeBits) + 1;
2807 UDFPrint((
" partitionMapType = %x\n", PartMap->partitionMapType));
2808 UDFPrint((
" partitionMapLength = %x\n", PartMap->partitionMapLength));
2809 UDFPrint((
" volSeqNum = %x\n", PartMap->volSeqNum));
2810 UDFPrint((
" partitionNum = %x\n", PartMap->partitionNum));
2811 UDFPrint((
" packetLength = %x\n", PartMap->packetLength));
2812 UDFPrint((
" numSparingTables = %x\n", PartMap->numSparingTables));
2813 UDFPrint((
" sizeSparingTable = %x\n", PartMap->sizeSparingTable));
2816 if(
Vcb->SparingTable) {
2819 RelocMap =
Vcb->SparingTable;
2829 Vcb->SparingBlockSize = PartMap->packetLength;
2832 for(
i=0;
i<PartMap->numSparingTables;
i++) {
2834 SparTableLoc = ((
uint32*)(PartMap+1))[
i];
2835 for(
n=0;
n<
Vcb->SparingTableCount;
n++) {
2836 if(
Vcb->SparingTableLoc[
i] == SparTableLoc) {
2837 UDFPrint((
" already processed @%x\n",
2851 >>
Vcb->BlockSizeBits);
2853 UDFPrint((
" sizeSparingTable @%x too long: %x > %x\n",
2854 SparTableLoc, BC2, BC
2863 UDFPrint((
" Error reading sizeSparingTable @%x (%x)\n",
2876 #ifdef UDF_TRACK_FS_STRUCTURES 2877 for(
j=0;
j<SparTable->reallocationTableLen;
j++) {
2880 #endif //UDF_TRACK_FS_STRUCTURES 2882 Vcb->SparingTableLoc[
Vcb->SparingTableCount] = SparTableLoc;
2883 Vcb->SparingTableCount++;
2886 for(
n=0;
n<SparTable->reallocationTableLen;
n++) {
2888 for(
m=0;
m<
Vcb->SparingCount;
m++) {
2889 if(RelocMap[
m].mappedLocation == NewRelocMap[
n].mappedLocation) {
2890 UDFPrint((
" dup @%x (%x) vs @%x (%x)\n",
2891 RelocMap[
m].origLocation, RelocMap[
m].mappedLocation,
2892 NewRelocMap[
m].origLocation, NewRelocMap[
m].mappedLocation));
2895 if((RelocMap[
m].origLocation == NewRelocMap[
n].origLocation) &&
2896 (RelocMap[
m].mappedLocation != NewRelocMap[
n].mappedLocation) &&
2899 UDFPrint((
" conflict @%x (%x) vs @%x (%x)\n",
2900 RelocMap[
m].origLocation, RelocMap[
m].mappedLocation,
2901 NewRelocMap[
n].origLocation, NewRelocMap[
n].mappedLocation));
2906 RelocMap[
Vcb->SparingCount] = NewRelocMap[
n];
2909 Vcb->SparingCount++;
2922 UDFPrint((
" too many Sparing Tables\n"));
2927 Vcb->SparingTable = RelocMap;
2942 #if defined(_X86_) && defined(_MSC_VER) && !defined(__clang__) 2955 __asm jne
short not_all_zeros
2996 UDFPrint((
"UDFGetDiskInfoAndVerify\n"));
3002 UDFPrint((
" FILE_DEVICE_CD_ROM_FILE_SYSTEM\n"));
3007 UDFPrint((
"UDFGetDiskInfoAndVerify: no CDFS VRS found\n"));
3008 if(!
Vcb->TrackMap[
Vcb->LastTrackNum].LastLba &&
3009 !
Vcb->TrackMap[
Vcb->FirstTrackNum].LastLba) {
3011 UDFPrint((
"UDFGetDiskInfoAndVerify: set UDF_VCB_FLAGS_RAW_DISK\n"));
3024 UDFPrint((
"UDFGetDiskInfoAndVerify: possible FS detected, remove UDF_VCB_FLAGS_RAW_DISK\n"));
3036 UDFPrint((
"UDFGetDiskInfoAndVerify: check NSR presence\n"));
static unsigned int block
OSSTATUS UDFAddXSpaceBitmap(IN PVCB Vcb, IN uint32 PartNum, IN PSHORT_AD bm, IN ULONG bm_type)
#define UDFAcquireResourceExclusive(Resource, CanWait)
#define VDS_POS_PRIMARY_VOL_DESC
OSSTATUS UDFUpdateXSpaceBitmaps(IN PVCB Vcb, IN uint32 PartNum, IN PPARTITION_HEADER_DESC phd)
OSSTATUS UDFUpdateSparingTable(IN PVCB Vcb)
struct _FILE_SET_DESC * PFILE_SET_DESC
#define TID_TERMINAL_ENTRY
SparingEntry SPARING_ENTRY
#define TID_UNALLOC_SPACE_DESC
#define STATUS_INSUFFICIENT_RESOURCES
#define EXTENT_RECORDED_ALLOCATED
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define UDF_MAX_WRITE_REVISION
void __fastcall UDFPackMapping(IN PVCB Vcb, IN PEXTENT_INFO ExtInfo)
static void xor(unsigned char *dst, const unsigned char *a, const unsigned char *b, const int count)
OSSTATUS UDFReadExtent(IN PVCB Vcb, IN PEXTENT_INFO ExtInfo, IN int64 Offset, IN SIZE_T Length, IN BOOLEAN Direct, OUT int8 *Buffer, OUT PSIZE_T ReadBytes)
ACPI_SIZE strlen(const char *String)
#define VDS_POS_IMP_USE_VOL_DESC
#define PARTITION_ACCESS_WO
extent_ad mainVolDescSeqExt
#define STATUS_INVALID_PARAMETER
OSSTATUS UDFLoadUnallocatedSpaceDesc(IN PVCB Vcb, int8 *Buf)
OSSTATUS UDFLoadLogicalVolInt(PDEVICE_OBJECT DeviceObject, PVCB Vcb, extent_ad loc)
#define INTEGRITY_TYPE_CLOSE
#define VDS_POS_PARTITION_DESC
#define UDFSetEntityID_imp(eID, Str)
#define TID_ADAPTEC_LOGICAL_VOL_DESC
#define UDFSetFreeBit(arr, bit)
#define UDFReleaseResource(Resource)
#define UDFRegisterFsStructure(Vcb, Lba, Length)
void UDFSetUpTag(IN PVCB Vcb, IN tag *Tag, IN uint16 DataLen, IN uint32 TagLoc)
OSSTATUS UDFUpdateVDS(IN PVCB Vcb, IN uint32 block, IN uint32 lastblock, IN uint32 flags)
OSSTATUS __fastcall UDFSetDstring(IN PUNICODE_STRING UName, IN dstring *Dest, IN uint32 Length)
extent_ad integritySeqExt
OSSTATUS UDFLoadLogicalVol(PDEVICE_OBJECT DeviceObject, PVCB Vcb, int8 *Buf, lb_addr *fileset)
#define TID_TERMINATING_DESC
OSSTATUS UDFLoadImpUseVolDesc(IN PVCB Vcb, int8 *Buf)
#define MAX_ANCHOR_LOCATIONS
OSSTATUS UDFReadData(IN PVCB Vcb, IN BOOLEAN Translate, IN LONGLONG Offset, IN ULONG Length, IN BOOLEAN Direct, OUT PCHAR Buffer, OUT PSIZE_T ReadBytes)
#define STATUS_INVALID_VOLUME_LABEL
#define STATUS_WRONG_VOLUME
#define UDF_PREALLOC_CLASS_FE
OSSTATUS UDFBuildFreeSpaceBitmap(IN PVCB Vcb, IN uint32 PartNdx, IN PPARTITION_HEADER_DESC phd, IN uint32 Lba)
OSSTATUS UDFGetDiskInfoAndVerify(IN PDEVICE_OBJECT DeviceObject, IN PVCB Vcb)
static calc_node_t * pop(void)
struct _SPARABLE_PARTITION_MAP * PSPARABLE_PARTITION_MAP
OSSTATUS UDFVerifyPartDesc(PVCB Vcb, int8 *Buf)
#define UDF_PART_DAMAGED_RO
OSSTATUS UDFLoadPartition(IN PDEVICE_OBJECT DeviceObject, IN PVCB Vcb, OUT lb_addr *fileset)
#define STATUS_NONEXISTENT_SECTOR
struct _SPACE_BITMAP_DESC SPACE_BITMAP_DESC
#define UDF_VIRTUAL_MAP20
#define UDFGetLVIDiUse(Vcb)
void UDFLoadPVolDesc(PVCB Vcb, int8 *Buf)
VOID WCachePurgeAll__(IN PW_CACHE Cache, IN PVOID Context)
OSSTATUS UDFUpdateVolIdent(IN PVCB Vcb, IN UDF_VDS_RECORD Lba, IN PUNICODE_STRING VolIdent)
#define STATUS_UNRECOGNIZED_MEDIA
#define UDF_VCB_FLAGS_RAW_DISK
#define UDFSetFreeBitOwner(Vcb, i)
VOID WCacheFlushAll__(IN PW_CACHE Cache, IN PVOID Context)
OSSTATUS UDFLoadPartDesc(PVCB Vcb, int8 *Buf)
#define UDF_VCB_FLAGS_VOLUME_READ_ONLY
_In_ PDEVICE_OBJECT DeviceObject
#define UDF_VCB_IC_W2K_COMPAT_VLABEL
OSSTATUS UDFUpdateLogicalVolInt(PVCB Vcb, BOOLEAN Close)
OSSTATUS UDFLoadBogusLogicalVol(PDEVICE_OBJECT DeviceObject, PVCB Vcb, int8 *Buf, lb_addr *fileset)
#define TID_EXTENDED_FILE_ENTRY
#define STATUS_FILE_CORRUPT_ERROR
uint32 __fastcall UDFGetPartFreeSpace(IN PVCB Vcb, IN uint32 partNum)
OSSTATUS UDFFlushAllCachedAllocations(IN PVCB Vcb, IN uint32 AllocClass)
extent_ad reserveVolDescSeqExt
struct _SPARING_TABLE * PSPARING_TABLE
#define UDF_USER_FS_FLAGS_MEDIA_DEFECT_RO
#define STATUS_UNRECOGNIZED_VOLUME
#define UDF_METADATA_MAP25
uint32 __fastcall UDFPartLbaToPhys(IN PVCB Vcb, IN lb_addr *Addr)
#define MAX_SPARING_TABLE_LOCATIONS
struct _ACPI_EFI_BOOT_SERVICES * BS
#define TID_PARTITION_DESC
#define PARTITION_MAP_TYPE_1
#define UDF_PART_DAMAGED_RW
#define PARTITION_ACCESS_MAX_KNOWN
PSPARING_ENTRY PSPARING_MAP
#define EXTENT_NOT_RECORDED_NOT_ALLOCATED
#define TID_PRIMARY_VOL_DESC
BOOLEAN UDFCheckZeroBuf(IN int8 *Buf, IN uint32 Length)
OSSTATUS UDFFlushFile__(IN PVCB Vcb, IN PUDF_FILE_INFO FileInfo, IN ULONG FlushFlags)
#define UDF_USER_FS_FLAGS_PART_RO
OSSTATUS UDFLoadSparingTable(IN PVCB Vcb, IN PSPARABLE_PARTITION_MAP PartMap)
int64 UDFGetExtentLength(IN PEXTENT_MAP Extent)
uint32 __fastcall UDFPartStart(PVCB Vcb, uint32 PartNum)
OSSTATUS UDFRecordVAT(IN PVCB Vcb)
#define VDS_POS_UNALLOC_SPACE_DESC
extent_ad nextVolDescSeqExt
OSSTATUS UDFVerifySequence(IN PDEVICE_OBJECT DeviceObject, IN PVCB Vcb, IN uint32 block, IN uint32 lastblock, OUT lb_addr *fileset)
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 GLint GLint j
_In_ ULONG _In_ ULONG_PTR ident
#define UDFSetUsedBits(arr, bit, bc)
#define TID_LOGICAL_VOL_INTEGRITY_DESC
#define UDFSetZeroBit(arr, bit)
#define PARTITION_MAP_TYPE_2
#define UDFClrZeroBit(arr, bit)
#define UDF_SPARABLE_MAP15
#define UDFGetBadBit(arr, bit)
#define SPARING_LOC_AVAILABLE
ecx edi ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl eax
LONGLONG UDFTimeToNT(IN PUDF_TIME_STAMP UdfTime)
ecx edi ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx movl TEMP incl eax andl eax ecx incl ebx eax jnz xchgl ecx incl TEMP esp ecx subl ebx pushl ecx ecx edx ecx ecx mm0 mm4 mm0 mm4 mm1 mm5 mm1 mm5 mm2 mm6 mm2 mm6 mm3 mm7 mm3 mm7 paddd mm0 paddd mm4 paddd mm0 paddd mm4 paddd mm0 paddd mm4 movq mm1 movq mm5 mm1 mm5 paddd mm0 paddd mm4 mm0 mm4 packssdw mm0 packssdw mm4 mm1 punpckldq mm0 pand mm1 pand mm0 por mm1 movq edi esi edx edi decl ecx jnz popl ecx ecx jecxz mm0 mm0 mm1 mm1 mm2 mm2 mm3 mm3 paddd mm0 paddd mm0 paddd mm0 movq mm1 mm1 paddd mm0 mm0 packssdw mm0 movd eax movw edi esi edx edi
PEXTENT_MAP __fastcall UDFMergeMappings(IN PEXTENT_MAP Extent, IN PEXTENT_MAP Extent2)
#define RtlFillMemory(Dest, Length, Fill)
#define UDF_VCB_IC_MRW_ADDR_PROBLEM
#define PARTITION_CONTENTS_NSR03
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
struct _SPARING_TABLE SPARING_TABLE
#define EXTENT_NOT_RECORDED_ALLOCATED
void __fastcall UDFCompressUnicode(IN PUNICODE_STRING UName, IN OUT uint8 **_CS0, IN OUT PSIZE_T Length)
uint32 __fastcall UDFPartLen(PVCB Vcb, uint32 PartNum)
void __fastcall UDFGetDstring(IN OUT PUNICODE_STRING UName, IN dstring *Dest, IN uint32 Length)
#define UDFExtentToMapping(e)
static struct proto Ext[]
OSSTATUS UDFWriteSectors(IN PVCB Vcb, IN BOOLEAN Translate, IN uint32 Lba, IN uint32 BCount, IN BOOLEAN Direct, IN int8 *Buffer, OUT PSIZE_T WrittenBytes)
OSSTATUS UDFUmount__(IN PVCB Vcb)
#define TrackMap_FixMRWAddressing
uint8 logicalVolContentsUse[32]
#define VDS_POS_RECURSION_COUNTER
#define STATUS_UNSUCCESSFUL
#define VRS_ISO9660_FOUND
#define TID_ANCHOR_VOL_DESC_PTR
struct _UDFPartMap * PUDFPartMap
lba_t UDFFindAnchor(PVCB Vcb)
#define UDF_VCB_ASSUME_ALL_USED
#define VDS_POS_TERMINATING_DESC
OSSTATUS UDFUpdateNonAllocated(IN PVCB Vcb)
_Must_inspect_result_ _In_ USHORT NewSize
#define TID_SPACE_BITMAP_DESC
struct _SPACE_BITMAP_DESC * PSPACE_BITMAP_DESC
ULONG UDFLocateLbaInExtent(IN PVCB Vcb, IN PEXTENT_MAP Extent, IN lba_t lba)
#define UDF_MAX_LVID_CHAIN_LENGTH
#define UDFMarkSpaceAsXXX(Vcb, FileInfo, Map, asXXX)
ULONG WCacheGetWriteBlockCount__(IN PW_CACHE Cache)
struct _SparingEntry SparingEntry
void UDFLoadFileset(IN PVCB Vcb, IN PFILE_SET_DESC fset, OUT lb_addr *root, OUT lb_addr *sysstream)
OSSTATUS UDFReadVDS(IN PVCB Vcb, IN uint32 block, IN uint32 lastblock, IN PUDF_VDS_RECORD vds, IN int8 *Buf)
OSSTATUS UDFIsCachedBadSequence(IN PVCB Vcb, IN uint32 Lba)
uint8 logicalVolContentsUse[16]
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
uint32 __fastcall UDFPartEnd(PVCB Vcb, uint32 PartNum)
#define TID_LOGICAL_VOL_DESC
uint32 UDFFindVRS(PVCB Vcb)
#define SPARING_LOC_CORRUPTED
#define PARTITION_CONTENTS_NSR02
struct _PARTITION_HEADER_DESC * PPARTITION_HEADER_DESC
VOID UDFRememberBadSequence(IN PVCB Vcb, IN uint32 Lba, IN OSSTATUS RC)
void __fastcall UDFDecompressUnicode(IN OUT PUNICODE_STRING UName, IN uint8 *CS0, IN SIZE_T Length, OUT uint16 *valueCRC)
OSSTATUS UDFVerifyXSpaceBitmap(IN PVCB Vcb, IN uint32 PartNum, IN PSHORT_AD bm, IN ULONG bm_type)
uint8 stdIdent[STD_ID_LEN]
#define UDF_PART_DAMAGED_NO
#define VDS_POS_LOGICAL_VOL_DESC
#define UDF_USER_FS_FLAGS_NEW_FS_RO
OSSTATUS UDFReadTagged(PVCB Vcb, int8 *Buf, uint32 Block, uint32 Location, uint16 *Ident)
#define UDFGetUsedBit(arr, bit)
#define UDF_PREALLOC_CLASS_DIR
OSSTATUS UDFWriteExtent(IN PVCB Vcb, IN PEXTENT_INFO ExtInfo, IN int64 Offset, IN SIZE_T Length, IN BOOLEAN Direct, IN int8 *Buffer, OUT PSIZE_T WrittenBytes)
uint16 partitionReferenceNum
OSSTATUS UDFVerifyFreeSpaceBitmap(IN PVCB Vcb, IN uint32 PartNdx, IN PPARTITION_HEADER_DESC phd, IN uint32 Lba)
OSSTATUS UDFUpdatePartDesc(PVCB Vcb, int8 *Buf)
#define EXTENT_NEXT_EXTENT_ALLOCDESC
#define UDF_MAX_READ_REVISION
OSSTATUS UDFUpdateLogicalVol(IN PVCB Vcb, IN UDF_VDS_RECORD Lba, IN PUNICODE_STRING VolIdent)
#define UDF_CHECK_BITMAP_RESOURCE(Vcb)
#define UDF_VIRTUAL_MAP15
timestamp recordingDateAndTime
#define FILE_DEVICE_CD_ROM_FILE_SYSTEM
VOID UDFVFlush(IN PVCB Vcb)
#define INTEGRITY_TYPE_OPEN
#define TID_IMP_USE_VOL_DESC
#define STATUS_DISK_CORRUPT_ERROR
#define UDFGetZeroBit(arr, bit)
OSSTATUS WCacheFlushBlocks__(IN PW_CACHE Cache, IN PVOID Context, IN lba_t Lba, IN ULONG BCount)
OSSTATUS UDFPrepareXSpaceBitmap(IN PVCB Vcb, IN OUT PSHORT_AD XSpaceBitmap, IN OUT PEXTENT_INFO XSBMExtInfo, IN OUT int8 **XSBM, IN OUT uint32 *XSl)
#define UDFAllocFreeExtent(v, l, ss, sl, e, af)
int strcmp(const char *String1, const char *String2)
#define RtlZeroMemory(Destination, Length)
void UDFReadEntityID_Domain(PVCB Vcb, EntityID *eID)
#define UDFGetFreeBit(arr, bit)
#define RtlCopyMemory(Destination, Source, Length)
#define UDFGetPartNumByPartNdx(Vcb, pi)
uint32 __fastcall UDFGetPartNumByPhysLba(IN PVCB Vcb, IN uint32 Lba)
GLuint GLuint GLsizei GLenum type
#define EXTENT_FLAG_ALLOC_SEQUENTIAL
static void push(calc_node_t *op)
OSSTATUS UDFProcessSequence(IN PDEVICE_OBJECT DeviceObject, IN PVCB Vcb, IN uint32 block, IN uint32 lastblock, OUT lb_addr *fileset)
#define UDFSetUsedBit(arr, bit)
static SERVICE_STATUS status
#define UDF_EXTENT_LENGTH_MASK
SIZE_T __stdcall UDFGetBitmapLen(uint32 *Bitmap, SIZE_T Offs, SIZE_T Lim)
uint32 UDFPhysLbaToPart(IN PVCB Vcb, IN uint32 PartNum, IN uint32 Addr)
OSSTATUS UDFLoadVAT(IN PVCB Vcb, IN uint32 PartNdx)
#define TID_FILE_SET_DESC
#define UDFReadSectors(Vcb, Translate, Lba, BCount, Direct, Buffer, ReadBytes)
OSSTATUS UDFFindLastFileSet(IN PVCB Vcb, IN lb_addr *Addr, IN OUT PFILE_SET_DESC FileSetDesc)
OSSTATUS WCacheSetMode__(IN PW_CACHE Cache, IN ULONG Mode)
#define VDS_POS_VOL_DESC_PTR
#define RtlCompareMemory(s1, s2, l)
VOID UDFPreClrModified(IN PVCB Vcb)
#define LBA_OUT_OF_EXTENT
VOID UDFClrModified(IN PVCB Vcb)