- Timestamp:
- Jun 9, 2017 3:09:10 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Runtime/common/fs/isomaker.cpp (modified) (27 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/fs/isomaker.cpp
r67305 r67325 129 129 /** Sorted array of children. */ 130 130 PPRTFSISOMAKERNAME papChildren; 131 132 131 /** The translate table file. */ 133 132 PRTFSISOMAKERFILE pTransTblFile; 133 134 /** The offset in the path table (ISO-9660). 135 * This is set when finalizing the image. */ 136 uint32_t offPathTable; 137 /** The path table identifier of this directory (ISO-9660). 138 * This is set when finalizing the image. */ 139 uint16_t idPathTable; 140 /** Pointer to back to the namespace node this belongs to (for the finalized 141 * entry list). */ 142 PRTFSISOMAKERNAME pName; 143 /** Entry in the list of finalized directories. */ 144 RTLISTNODE FinalizedEntry; 134 145 } RTFSISOMAKERNAMEDIR; 135 146 /** Pointer to directory specfic name space node info. */ … … 194 205 uint64_t INode; 195 206 207 /** Size of the directory record (ISO-9660). 208 * This is set when the image is being finalized. */ 209 uint16_t cbDirRec; 210 211 /** The number of bytes the name requires in the directory record. */ 212 uint16_t cbNameInDirRec; 196 213 /** The name length. */ 197 214 uint16_t cchName; … … 300 317 /** The file data size. */ 301 318 uint64_t cbData; 302 /** Byte offset of the data in the image. */ 319 /** Byte offset of the data in the image. 320 * UINT64_MAX until the location is finalized. */ 303 321 uint64_t offData; 304 322 … … 316 334 PRTFSISOMAKERNAME pTransTblDir; 317 335 } u; 336 337 /** Entry in the list of finalized directories. */ 338 RTLISTNODE FinalizedEntry; 318 339 } RTFSISOMAKERFILE; 319 340 … … 372 393 uint64_t cbData; 373 394 /** Number of volume descriptors. */ 374 uint 8_tcVolumeDescriptors;395 uint32_t cVolumeDescriptors; 375 396 376 397 /** The 'now' timestamp we use for the whole image. … … 387 408 RTFMODE fDefaultDirMode; 388 409 410 411 /** @name Finalized image stuff 412 * @{ */ 389 413 /** The finalized image size. */ 390 414 uint64_t cbFinalizedImage; 391 //PISO9660PRIMARYVOLDESC 415 /** System area content (sectors 0 thur 15). This is NULL if the system area 416 * are all zeros, which is often the case. Hybrid ISOs have an MBR followed by 417 * a GUID partition table here, helping making the image bootable when 418 * transfered to a USB stick. */ 419 uint8_t *pbSysArea; 420 /** Number of non-zero system area bytes pointed to by pbSysArea. */ 421 size_t cbSysArea; 422 423 /** Pointer to the buffer holding the volume descriptors. */ 424 uint8_t *pbVolDescs; 425 /** Pointer to the primary volume descriptor. */ 426 PISO9660PRIMARYVOLDESC pPrimaryVolDesc; 427 /** El Torito volume descriptor. 428 * @todo fix type */ 429 PISO9660BOOTRECORD pElToritoDesc; 430 /** Pointer to the primary volume descriptor. */ 431 PISO9660SUPVOLDESC pJolietVolDesc; 432 /** Terminating ISO-9660 volume descriptor. */ 433 PISO9660VOLDESCHDR pTerminatorVolDesc; 434 435 /** Finalized ISO-9660 directory structures. */ 436 struct RTFSISOMAKERFINALIZEDDIRS 437 { 438 /** The image byte offset of the first directory. */ 439 uint64_t offDirs; 440 /** The image byte offset of the little endian path table. 441 * This always follows offDirs. */ 442 uint64_t offPathTableL; 443 /** The image byte offset of the big endian path table. 444 * This always follows offPathTableL. */ 445 uint64_t offPathTableM; 446 /** List of finalized directories for this namespace. 447 * The list is in path table order so it can be generated on the fly. The 448 * directories will be ordered in the same way. */ 449 RTLISTANCHOR FinalizedDirs; 450 /** Rock ridge spill file. */ 451 PRTFSISOMAKERFILE pRRSpillFile; 452 } 453 /** The finalized directory data for the primary ISO-9660 namespace. */ 454 PrimaryIsoDirs, 455 /** The finalized directory data for the joliet namespace. */ 456 JolietDirs; 457 458 /** The image byte offset of the first file. */ 459 uint64_t offFirstFile; 460 /** Finalized file head (RTFSISOMAKERFILE). 461 * The list is ordered by disk location. Files are following the 462 * directories and path tables. */ 463 RTLISTANCHOR FinalizedFiles; 464 /** @} */ 465 392 466 } RTFSISOMAKERINT; 393 467 /** Pointer to an ISO maker instance. */ 394 468 typedef RTFSISOMAKERINT *PRTFSISOMAKERINT; 469 470 /** Pointer to the data for finalized ISO-9660 (primary / joliet) dirs. */ 471 typedef struct RTFSISOMAKERINT::RTFSISOMAKERFINALIZEDDIRS *PRTFSISOMAKERFINALIZEDDIRS; 395 472 396 473 … … 505 582 pThis->cRefs = 1; 506 583 //pThis->fSeenContent = false; 584 //pThis->fFinalized = false; 507 585 508 586 pThis->PrimaryIso.fNamespace = RTFSISOMAKER_NAMESPACE_ISO_9660; … … 538 616 pThis->fDefaultDirMode = 0555 | RTFS_TYPE_DIRECTORY | RTFS_DOS_DIRECTORY | RTFS_DOS_READONLY; 539 617 618 pThis->cbFinalizedImage = UINT64_MAX; 619 //pThis->pbSysArea = NULL; 620 //pThis->cbSysArea = 0; 621 //pThis->pbVolDescs = NULL; 622 //pThis->pPrimaryVolDesc = NULL; 623 //pThis->pElToritoDesc = NULL; 624 //pThis->pJolietVolDesc = NULL; 625 626 pThis->PrimaryIsoDirs.offDirs = UINT64_MAX; 627 pThis->PrimaryIsoDirs.offPathTableL = UINT64_MAX; 628 pThis->PrimaryIsoDirs.offPathTableM = UINT64_MAX; 629 RTListInit(&pThis->PrimaryIsoDirs.FinalizedDirs); 630 //pThis->PrimaryIsoDirs.pRRSpillFile = NULL; 631 632 pThis->JolietDirs.offDirs = UINT64_MAX; 633 pThis->JolietDirs.offPathTableL = UINT64_MAX; 634 pThis->JolietDirs.offPathTableM = UINT64_MAX; 635 RTListInit(&pThis->JolietDirs.FinalizedDirs); 636 //pThis->JolietDirs.pRRSpillFile = NULL; 637 638 pThis->offFirstFile = UINT64_MAX; 639 RTListInit(&pThis->FinalizedFiles); 640 540 641 RTTimeNow(&pThis->ImageCreationTime); 541 542 642 *phIsoMaker = pThis; 543 643 return VINF_SUCCESS; … … 1167 1267 * @param pcchDst Where to return the length of the returned string (i.e. 1168 1268 * not counting the terminator). 1269 * @param pcbInDirRec Where to return the name size in the directory record. 1169 1270 */ 1170 1271 static int rtFsIsoMakerNormalizeNameForPrimaryIso9660(PRTFSISOMAKERINT pThis, PRTFSISOMAKERNAME pParent, 1171 1272 const char *pchSrc, size_t cchSrc, bool fIsDir, 1172 char *pszDst, size_t cbDst, size_t *pcchDst )1273 char *pszDst, size_t cbDst, size_t *pcchDst, size_t *pcbInDirRec) 1173 1274 { 1174 1275 AssertReturn(cbDst > ISO9660_MAX_NAME_LEN, VERR_INTERNAL_ERROR_3); … … 1241 1342 if (!rtFsIsoMakerFindObjInDir(pParent, pszDst, cchDst)) 1242 1343 { 1243 *pcchDst = cchDst; 1344 *pcchDst = cchDst; 1345 *pcbInDirRec = cchDst; 1244 1346 return VINF_SUCCESS; 1245 1347 } … … 1273 1375 if (!rtFsIsoMakerFindObjInDir(pParent, pszDst, cchDst)) 1274 1376 { 1275 *pcchDst = cchDst; 1377 *pcchDst = cchDst; 1378 *pcbInDirRec = cchDst; 1276 1379 return VINF_SUCCESS; 1277 1380 } … … 1297 1400 * @param pcchDst Where to return the length of the returned string (i.e. 1298 1401 * not counting the terminator). 1402 * @param pcbInDirRec Where to return the name size in the directory record. 1299 1403 */ 1300 1404 static int rtFsIsoMakerNormalizeNameForNamespace(PRTFSISOMAKERINT pThis, PRTFSISOMAKERNAMESPACE pNamespace, 1301 1405 PRTFSISOMAKERNAME pParent, const char *pchSrc, size_t cchSrc, bool fIsDir, 1302 char *pszDst, size_t cbDst, size_t *pcchDst )1406 char *pszDst, size_t cbDst, size_t *pcchDst, size_t *pcbInDirRec) 1303 1407 { 1304 1408 if (cchSrc > 0) … … 1314 1418 */ 1315 1419 case RTFSISOMAKER_NAMESPACE_ISO_9660: 1316 return rtFsIsoMakerNormalizeNameForPrimaryIso9660(pThis, pParent, pchSrc, cchSrc, fIsDir, pszDst, cbDst, pcchDst); 1420 return rtFsIsoMakerNormalizeNameForPrimaryIso9660(pThis, pParent, pchSrc, cchSrc, fIsDir, 1421 pszDst, cbDst, pcchDst, pcbInDirRec); 1317 1422 1318 1423 /* … … 1325 1430 memcpy(pszDst, pchSrc, cchSrc); 1326 1431 pszDst[cchSrc] = '\0'; 1327 *pcchDst = cchSrc; 1432 *pcchDst = cchSrc; 1433 *pcbInDirRec = RTStrCalcUtf16Len(pszDst); 1328 1434 return VINF_SUCCESS; 1329 1435 } … … 1342 1448 * Root special case. 1343 1449 */ 1450 *pszDst = '\0'; 1451 *pcchDst = 0; 1452 *pcbInDirRec = 0; 1344 1453 AssertReturn(pParent, VERR_INTERNAL_ERROR_3); 1345 *pszDst = '\0';1346 *pcchDst = 0;1347 1454 return VINF_SUCCESS; 1348 1455 } … … 1449 1556 */ 1450 1557 size_t cchName; 1558 size_t cbNameInDirRec; 1451 1559 char szName[RTFSISOMAKER_MAX_NAME_BUF]; 1452 1560 int rc = rtFsIsoMakerNormalizeNameForNamespace(pThis, pNamespace, pParent, pchSpec, cchSpec, 1453 1561 pObj->enmType == RTFSISOMAKEROBJTYPE_DIR, 1454 szName, sizeof(szName), &cchName );1562 szName, sizeof(szName), &cchName, &cbNameInDirRec); 1455 1563 if (RT_SUCCESS(rc)) 1456 1564 { … … 1465 1573 pName->pObj = pObj; 1466 1574 pName->pParent = pParent; 1575 pName->cbNameInDirRec = (uint16_t)cbNameInDirRec; 1467 1576 pName->cchName = (uint16_t)cchName; 1468 1577 … … 1486 1595 pName->cHardlinks = 1; 1487 1596 pName->INode = pObj->idxObj; 1597 pName->cbDirRec = 0; 1488 1598 1489 1599 memcpy(pName->szName, szName, cchName); … … 1502 1612 pDir->papChildren = NULL; 1503 1613 pDir->pTransTblFile = NULL; 1614 pDir->pName = pName; 1615 pDir->offPathTable = UINT32_MAX; 1616 pDir->idPathTable = UINT16_MAX; 1617 RTListInit(&pDir->FinalizedEntry); 1504 1618 pName->pDir = pDir; 1505 1619 … … 2234 2348 pFile->enmSrcType = RTFSISOMAKERSRCTYPE_INVALID; 2235 2349 pFile->u.pszSrcPath = NULL; 2350 RTListInit(&pFile->FinalizedEntry); 2236 2351 2237 2352 *ppFile = pFile; … … 2481 2596 2482 2597 /** 2598 * Gathers the dirs for an ISO-9660 namespace (e.g. primary or joliet). 2599 * 2600 * @param pNamespace The namespace. 2601 * @param pFinalizedDirs The finalized directory structure. The 2602 * FinalizedDirs will be worked here. 2603 */ 2604 static void rtFsIsoMakerFinalizeGatherDirs(PRTFSISOMAKERNAMESPACE pNamespace, PRTFSISOMAKERFINALIZEDDIRS pFinalizedDirs) 2605 { 2606 RTListInit(&pFinalizedDirs->FinalizedDirs); 2607 2608 /* 2609 * Enter the root directory (if we got one). 2610 */ 2611 if (!pNamespace->pRoot) 2612 return; 2613 PRTFSISOMAKERNAMEDIR pCurDir = pNamespace->pRoot->pDir; 2614 RTListAppend(&pFinalizedDirs->FinalizedDirs, &pCurDir->FinalizedEntry); 2615 do 2616 { 2617 /* 2618 * Scan pCurDir and add directories. We don't need to sort anything 2619 * here because the directory is already in path table compatible order. 2620 */ 2621 uint32_t cLeft = pCurDir->cChildren; 2622 PPRTFSISOMAKERNAME ppChild = pCurDir->papChildren; 2623 while (cLeft-- > 0) 2624 { 2625 PRTFSISOMAKERNAME pChild = *ppChild++; 2626 if (pChild->pDir) 2627 RTListAppend(&pFinalizedDirs->FinalizedDirs, &pChild->pDir->FinalizedEntry); 2628 } 2629 2630 /* 2631 * Advance to the next directory. 2632 */ 2633 pCurDir = RTListGetNext(&pFinalizedDirs->FinalizedDirs, pCurDir, RTFSISOMAKERNAMEDIR, FinalizedEntry); 2634 } while (pCurDir); 2635 } 2636 2637 2638 /** 2639 * Finalizes a directory entry (i.e. namespace node). 2640 * 2641 * This calculates the directory record size. 2642 * 2643 * @returns IPRT status code. 2644 * @param pFinalizedDirs . 2645 * @param pName The directory entry to finalize. 2646 * @param offInDir The offset in the directory of this record. 2647 * @param fIsRoot Indicates whether this is the root and would 2648 * therefore require more rock ridge fun and stuff. 2649 */ 2650 static int rtFsIsoMakerFinalizeIsoDirectoryEntry(PRTFSISOMAKERFINALIZEDDIRS pFinalizedDirs, PRTFSISOMAKERNAME pName, 2651 uint32_t offInDir, bool fIsRoot) 2652 { 2653 RT_NOREF(pFinalizedDirs, pName, offInDir, fIsRoot); 2654 return VERR_NOT_IMPLEMENTED; 2655 } 2656 2657 2658 /** 2659 * Finalizes either a primary and secondary ISO namespace. 2660 * 2661 * @returns IPRT status code 2662 * @param pThis The ISO maker instance. 2663 * @param pNamespace The namespace. 2664 * @param pFinalizedDirs The finalized directories structure for the 2665 * namespace. 2666 * @param poffData The data offset. We will allocate blocks for the 2667 * directories and the path tables. 2668 */ 2669 static int rtFsIsoMakerFinalizeDirectoriesInIsoNamespace(PRTFSISOMAKERINT pThis, PRTFSISOMAKERNAMESPACE pNamespace, 2670 PRTFSISOMAKERFINALIZEDDIRS pFinalizedDirs, uint64_t *poffData) 2671 { 2672 /* The directory data comes first, so take down it's offset. */ 2673 pFinalizedDirs->offDirs = *poffData; 2674 2675 /* Reset the rock ridge spill file, in case we someone are finalized multiple times. */ 2676 if (pFinalizedDirs->pRRSpillFile) 2677 { 2678 rtFsIsoMakerObjRemoveWorker(pThis, &pFinalizedDirs->pRRSpillFile->Core); 2679 pFinalizedDirs->pRRSpillFile = NULL; 2680 } 2681 2682 int rc; 2683 uint16_t idPathTable = 0; 2684 uint32_t cbPathTable = 0; 2685 if (pNamespace->pRoot) 2686 { 2687 /* 2688 * Precalc the directory record size for the root directory. 2689 */ 2690 rc = rtFsIsoMakerFinalizeIsoDirectoryEntry(pFinalizedDirs, pNamespace->pRoot, 0 /*offInDir*/, true /*fIsRoot*/); 2691 AssertRCReturn(rc, rc); 2692 2693 /* 2694 * Work thru the directories. 2695 */ 2696 PRTFSISOMAKERNAMEDIR pCurDir; 2697 RTListForEach(&pThis->PrimaryIsoDirs.FinalizedDirs, pCurDir, RTFSISOMAKERNAMEDIR, FinalizedEntry) 2698 { 2699 PRTFSISOMAKERNAME pCurName = pCurDir->pName; 2700 PRTFSISOMAKERNAME pParentName = pCurName->pParent ? pCurName->pParent : pCurName; 2701 2702 /* We don't do anything special for the special '.' and '..' directory 2703 entries, instead we use the directory entry in the parent directory 2704 with a 1 byte name (00 or 01). */ 2705 Assert(pCurName->cbDirRec != 0); 2706 uint32_t offInDir = pCurName->cbDirRec - pCurName->cbNameInDirRec + 1; 2707 offInDir += pParentName->cbDirRec - pParentName->cbNameInDirRec + 1; 2708 2709 /* Finalize the directory entries. */ 2710 uint32_t cbTransTbl = 0; 2711 uint32_t cLeft = pCurDir->cChildren; 2712 PPRTFSISOMAKERNAME ppChild = pCurDir->papChildren; 2713 while (cLeft-- > 0) 2714 { 2715 PRTFSISOMAKERNAME pChild = *ppChild++; 2716 rc = rtFsIsoMakerFinalizeIsoDirectoryEntry(pFinalizedDirs, pChild, offInDir, false /*fIsRoot*/); 2717 AssertRCReturn(rc, rc); 2718 2719 offInDir += pChild->cbDirRec; 2720 if (pChild->cchTransNm) 2721 cbTransTbl += 2 /* type & space*/ 2722 + RT_MAX(pChild->cchName, 39) 2723 + 1 /* tab */ 2724 + pChild->cchTransNm 2725 + 1 /* newline */; 2726 } 2727 2728 /* Set the directory size and location, advancing the data offset. */ 2729 pCurDir->cbDir = offInDir; 2730 pCurDir->offDir = *poffData; 2731 *poffData += RT_ALIGN_32(offInDir, RTFSISOMAKER_SECTOR_SIZE); 2732 2733 /* Set the translation table file size. */ 2734 if (pCurDir->pTransTblFile) 2735 pCurDir->pTransTblFile->cbData = cbTransTbl; 2736 2737 /* Add to the path table size calculation. */ 2738 pCurDir->offPathTable = cbPathTable; 2739 pCurDir->idPathTable = idPathTable++; 2740 cbPathTable += RT_OFFSETOF(ISO9660PATHREC, achDirId[pCurName->cbNameInDirRec]) + (pCurName->cbNameInDirRec & 1); 2741 } 2742 } 2743 2744 /* 2745 * Update the rock ridge spill file size. 2746 */ 2747 if (pFinalizedDirs->pRRSpillFile) 2748 { 2749 rc = RTVfsFileGetSize(pFinalizedDirs->pRRSpillFile->u.hVfsFile, &pFinalizedDirs->pRRSpillFile->cbData); 2750 AssertRCReturn(rc, rc); 2751 pThis->cbData += pFinalizedDirs->pRRSpillFile->cbData; 2752 } 2753 2754 /* 2755 * Calculate the path table offsets and move past them. 2756 */ 2757 pFinalizedDirs->offPathTableL = *poffData; 2758 *poffData += RT_ALIGN_64(cbPathTable, RTFSISOMAKER_SECTOR_SIZE); 2759 2760 pFinalizedDirs->offPathTableM = *poffData; 2761 *poffData += RT_ALIGN_64(cbPathTable, RTFSISOMAKER_SECTOR_SIZE); 2762 2763 return VINF_SUCCESS; 2764 } 2765 2766 2767 2768 /** 2483 2769 * Finalizes directories and related stuff. 2484 2770 * … … 2493 2779 static int rtFsIsoMakerFinalizeDirectories(PRTFSISOMAKERINT pThis, uint64_t *poffData) 2494 2780 { 2495 RT_NOREF(pThis, poffData); 2496 return VINF_SUCCESS; 2781 /* 2782 * Locate the directories, width first, inserting them in the finalized lists so 2783 * we can process them efficiently. 2784 */ 2785 rtFsIsoMakerFinalizeGatherDirs(&pThis->PrimaryIso, &pThis->PrimaryIsoDirs); 2786 rtFsIsoMakerFinalizeGatherDirs(&pThis->Joliet, &pThis->JolietDirs); 2787 2788 /* 2789 * Process the primary ISO and joliet namespaces. 2790 */ 2791 int rc = rtFsIsoMakerFinalizeDirectoriesInIsoNamespace(pThis, &pThis->PrimaryIso, &pThis->PrimaryIsoDirs, poffData); 2792 if (RT_SUCCESS(rc)) 2793 rc = rtFsIsoMakerFinalizeDirectoriesInIsoNamespace(pThis, &pThis->Joliet, &pThis->JolietDirs, poffData); 2794 if (RT_SUCCESS(rc)) 2795 { 2796 /* 2797 * Later: UDF, HFS. 2798 */ 2799 } 2800 return rc; 2497 2801 } 2498 2802 … … 2509 2813 static int rtFsIsoMakerFinalizeData(PRTFSISOMAKERINT pThis, uint64_t *poffData) 2510 2814 { 2511 RT_NOREF(pThis, poffData); 2815 /* 2816 * We currently does not have any ordering prioritizing implemented, so we 2817 * just store files in the order they were added. 2818 */ 2819 PRTFSISOMAKEROBJ pCur; 2820 RTListForEach(&pThis->ObjectHead, pCur, RTFSISOMAKEROBJ, Entry) 2821 { 2822 if (pCur->enmType == RTFSISOMAKEROBJTYPE_FILE) 2823 { 2824 PRTFSISOMAKERFILE pCurFile = (PRTFSISOMAKERFILE)pCur; 2825 if (pCurFile->offData == UINT64_MAX) 2826 { 2827 pCurFile->offData = *poffData; 2828 *poffData += RT_ALIGN_64(pCurFile->cbData, RTFSISOMAKER_SECTOR_SIZE); 2829 } 2830 } 2831 } 2832 2512 2833 return VINF_SUCCESS; 2513 2834 } … … 2524 2845 static int rtFsIsoMakerFinalizeVolumeDescriptors(PRTFSISOMAKERINT pThis) 2525 2846 { 2526 RT_NOREF(pThis); 2847 AssertReturn(pThis->pbVolDescs && pThis->pPrimaryVolDesc && pThis->pTerminatorVolDesc, VERR_INTERNAL_ERROR_3); 2848 2849 /* 2850 * The primary descriptor. 2851 */ 2852 2853 2854 /* 2855 * The terminator record. 2856 */ 2857 pThis->pTerminatorVolDesc->bDescType = ISO9660VOLDESC_TYPE_TERMINATOR; 2858 pThis->pTerminatorVolDesc->bDescVersion = 1; 2859 memcpy(pThis->pTerminatorVolDesc->achStdId, ISO9660VOLDESC_STD_ID, sizeof(pThis->pTerminatorVolDesc->achStdId)); 2860 2527 2861 return VINF_SUCCESS; 2528 2862 } … … 2549 2883 2550 2884 /* 2885 * Allocate space for the volume descriptors. 2886 */ 2887 RTMemFree(pThis->pbVolDescs); 2888 pThis->pbVolDescs = (uint8_t *)RTMemAllocZ(pThis->cVolumeDescriptors * RTFSISOMAKER_SECTOR_SIZE); 2889 AssertReturn(pThis->pbVolDescs, VERR_NO_MEMORY); 2890 2891 uint32_t offVolDescs = 0; 2892 2893 pThis->pPrimaryVolDesc = (PISO9660PRIMARYVOLDESC)&pThis->pbVolDescs[offVolDescs]; 2894 offVolDescs += RTFSISOMAKER_SECTOR_SIZE; 2895 2896 if (true) 2897 pThis->pElToritoDesc = NULL; 2898 else 2899 { 2900 pThis->pElToritoDesc = (PISO9660BOOTRECORD)&pThis->pbVolDescs[offVolDescs]; 2901 offVolDescs += RTFSISOMAKER_SECTOR_SIZE; 2902 } 2903 2904 if (!pThis->Joliet.uLevel) 2905 pThis->pJolietVolDesc = NULL; 2906 else 2907 { 2908 pThis->pJolietVolDesc = (PISO9660SUPVOLDESC)&pThis->pbVolDescs[offVolDescs]; 2909 offVolDescs += RTFSISOMAKER_SECTOR_SIZE; 2910 } 2911 2912 pThis->pTerminatorVolDesc = (PISO9660VOLDESCHDR)&pThis->pbVolDescs[offVolDescs]; 2913 offVolDescs += RTFSISOMAKER_SECTOR_SIZE; 2914 2915 if (pThis->Udf.uLevel > 0) 2916 { 2917 /** @todo UDF descriptors. */ 2918 } 2919 AssertReturn(offVolDescs == pThis->cVolumeDescriptors * RTFSISOMAKER_SECTOR_SIZE, VERR_INTERNAL_ERROR_2); 2920 2921 /* 2551 2922 * If there is any boot related stuff to be included, it ends up right after 2552 2923 * the descriptors. … … 2556 2927 if (RT_SUCCESS(rc)) 2557 2928 { 2929 /* 2930 * Directories and path tables comes next. 2931 */ 2558 2932 rc = rtFsIsoMakerFinalizeDirectories(pThis, &offData); 2559 2933 if (RT_SUCCESS(rc)) 2560 2934 { 2935 /* 2936 * Then we store the file data. 2937 */ 2561 2938 rc = rtFsIsoMakerFinalizeData(pThis, &offData); 2562 2939 if (RT_SUCCESS(rc)) … … 2565 2942 2566 2943 /* 2567 * Finally, finalize the volume descriptors. 2944 * Finally, finalize the volume descriptors as they depend on some of the 2945 * block allocations done in the previous steps. 2568 2946 */ 2569 2947 rc = rtFsIsoMakerFinalizeVolumeDescriptors(pThis);
Note:
See TracChangeset
for help on using the changeset viewer.

