Skip to content

Add missing libewf_extent_get_values() to support multi-extent files (and minor fix for MSVSCPP project) - #218

Open
datasynergyuk wants to merge 2 commits into
libyal:mainfrom
datasynergyuk:main
Open

Add missing libewf_extent_get_values() to support multi-extent files (and minor fix for MSVSCPP project)#218
datasynergyuk wants to merge 2 commits into
libyal:mainfrom
datasynergyuk:main

Conversation

@datasynergyuk

Copy link
Copy Markdown

Add missing libewf_extent_get_values() to support multi-extent files. This will allow existing code to stop using deprecated methods: get_media_data_offset()/get_media_data_size(). An extra bonus is that data_flags comes back per-extent, so per-extent sparse detection now becomes possible

Also fixed "LINK : fatal error LNK1181: cannot open input file '..\release\bzip2.lib'" in MSVSCPP build. Fix is to add 'libbz2.def' module defintion (.def) file so that the MSVSCPP project will emit required LIB file. Also modified project output filename to match bzip2/libbzip2 default of "LIBBZ2.dll". This is a partial fix for just the DLL name issue. The full fix would be to rename the project "LIBBZ2", however, this may have other implications so I have not touched this.

…se\bzip2.lib'" in MSVSCPP build. Fix is to add 'libbz2.def' module defintion (.def) file so that the MSVSCPP project will emit required LIB file. Also modified project output filename to match bzip2/libbzip2 default of "LIBBZ2.dll". This is a partial fix for the DLL name issue. The full fix would be to rename the project "LIBBZ2", however, this may have other implications so I have not touched this.
… This will allow existing code to stop using deprecated methods get_media_data_offset()/get_media_data_size(). An extra bonus is that data_flags comes back per-extent , so per-extent sparse detection now becomes possible.
@joachimmetz

Copy link
Copy Markdown
Member

Thanks for the proposed changes. I'll take a closer look when time permits. Note that I'll not merge the changes to the visual studio files.

@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.81%. Comparing base (7512e03) to head (57b6e46).

Files with missing lines Patch % Lines
libewf/libewf_extent.c 0.00% 24 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #218      +/-   ##
==========================================
+ Coverage   39.47%   39.81%   +0.33%     
==========================================
  Files         101      101              
  Lines       41381    40928     -453     
  Branches     9538     9543       +5     
==========================================
- Hits        16335    16294      -41     
+ Misses      21595    21203     -392     
+ Partials     3451     3431      -20     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@datasynergyuk

Copy link
Copy Markdown
Author

Thank you. Please can I ask why you will not merge the changes to the visual studio files? Is this because you think they are wrong, you can't test them or because you are not worried about Visual Studio compatibility? It would be helpful to know for future PR's. For what it is worth, it is a simple fix required due to recent changes in BZip2

@joachimmetz

Copy link
Copy Markdown
Member

They are autogenerated with https://github.com/libyal/vstools from the autoconf/make files.

Also note that bzip2 support is early WIP

@datasynergyuk

datasynergyuk commented Sep 8, 2026

Copy link
Copy Markdown
Author

Ok. Thank you for explaining. I will look into vstools and see if my fix is applicable there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants