Find root directory on UDF 2.50 - #430
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe UDF definitions add metadata partition and extended file-entry structures. The UDF browser resolves partition locations from logical-volume maps, reads extents through those locations, and returns either a regular or extended root directory entry. ChangesUDF partition and root directory support
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant DataReader
participant PartitionMap
participant RootDirectory
Browser->>DataReader: Read logical volume partition maps
Browser->>PartitionMap: Identify metadata partition map
Browser->>DataReader: Read metadata file and partition extent
Browser->>DataReader: Read file-set and root-directory descriptors
Browser->>RootDirectory: Return FileEntry or ExtendedFileEntry
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@filesystem/udf/udf_browser.ixx`:
- Around line 133-137: Update the root directory read in the surrounding UDF
browser logic to index partition_starting_locations with
root_directory_icb_extent.extent_location.partition_reference_number, matching
the preceding bounds check; leave the file set descriptor partition reference
unchanged for its own reads.
- Around line 92-119: Harden the partition-map parsing loop around
partition_map_offset and number_of_partition_maps by using a size-safe counter
and validating each structure read, including the header, type-2 header, and
partition_map_length advancement, against lvd_data.size(); skip or abort on
invalid values. Before using metadata_partition_map.partition_number, validate
it against partition_starting_locations.size(), and before reading
metadata_file_ad validate sizeof(udf::ExtendedFileEntry) plus
length_of_extended_attributes against metadata_file_data.size().
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: acf95496-b02e-412d-a383-ef874665df2e
📒 Files selected for processing (2)
filesystem/udf/udf_browser.ixxfilesystem/udf/udf_defs.ixx
Kind of a mess to figure out, slightly less of a mess to implement.
This just extends the functionality of #403 to cover UDF 2.50 images (i.e. the kind that aren't just backwards compatible ISO9660). Another PR will be needed to support actually reading files and traversing directories and so on.
As before, this is tested and working but because it isn't ready to be directly used I haven't added the temporary command I used to test it.
Summary by CodeRabbit
New Features
Bug Fixes