The metadata_only and resource_only fields in struct wimlib_wim_info are copied from the corresponding flags in the WIM header. However, wimlib never sets these flags in WIM files that it creates. So depending on where you got your WIM file from, these fields may always be 0.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The file Res.RWM has WIM_HDR_FLAG_RESOURCE_ONLY set, and the files index11[1].wim and index8[1].wim have WIM_HDR_FLAG_METADATA_ONLY set. And wimlib does in fact return map these correctly to the resource_only and metadata_only fields of struct wimlib_wim_info. However, wimlib does not use these flags for anything else, as I understand them to be unnecessary.
Is there a specific problem that you're having?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The wimlib_wim_info data is filled in correctly. The fields in question are bitfields and are all located in this 32-bit word:
8a 00 00 00
The bits that are set are bit 1 (opened_from_file), bit 3 (has_rpfix), and bit 7 (metadata_only).
Yes, wimlib-imagex ignores these flags, since I've understood them to be redundant with the image list, and potentially inconsistent with the information the WIM actually contains. Do you have a reason why you want these flags to be shown?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
depending one what kind of wim file the enduser selects
I check if there is need to look for other wim files needed to
be passed to wimlib_reference_resource_files().
Normally I check the total_parts count, but this time it was 1.
So I need the flags like Spanned or METADATA_ONLY.
Cause there are these structure members I expected to get
them filled by wimlib_get_wim_info().
Well no problem anymore, now that I know how to get them.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Great. I guess that's a valid use case, although I'd wonder if you might be better off just trying to do the extraction, and only looking for other WIM files if the extraction fails with WIMLIB_ERR_RESOURCE_NOT_FOUND.
Also I just realized that all the header flags do get shown if you run wimlib-imagex info --header --- they're just not shown in the default wimlib-imagex info output. For the latter I'm considering consolidating the various boolean flags into a single line, similar to the ImageX output...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
could it be that some attributes like metadata_only and resource_only are ignored?
The
metadata_only
andresource_only
fields instruct wimlib_wim_info
are copied from the corresponding flags in the WIM header. However, wimlib never sets these flags in WIM files that it creates. So depending on where you got your WIM file from, these fields may always be 0.It seems these flags are not stores in the header.
I got these wims form here: https://drive.google.com/file/d/0B1TFnslvRdR1OWdJTThOZTBIeHM/view?usp=sharing
imagex/wimgapi returns
Attributes: 0xa
Metadata only
Relative path junction
The file
Res.RWM
hasWIM_HDR_FLAG_RESOURCE_ONLY
set, and the filesindex11[1].wim
andindex8[1].wim
haveWIM_HDR_FLAG_METADATA_ONLY
set. And wimlib does in fact return map these correctly to theresource_only
andmetadata_only
fields ofstruct wimlib_wim_info
. However, wimlib does not use these flags for anything else, as I understand them to be unnecessary.Is there a specific problem that you're having?
using
wimlib_open_wim()
wimlib_get_wim_info()
on index8[1].wim, I get the following structure returned
0000 1b ab 14 d3 14 97 15 47 b2 d8 75 34 79 32 1d 96 .......G..u4y2..
0010 01 00 00 00 00 00 00 00 00 0d 01 00 00 80 00 00 ................
0020 01 00 01 00 02 00 00 00 4a 48 43 00 00 00 00 00 ........JHC.....
0030 8a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
there nothing set after has_integrity_table.
Also using wimlib-imagex info index8[1].wim doesn't mention these flags.
Hi,
The wimlib_wim_info data is filled in correctly. The fields in question are bitfields and are all located in this 32-bit word:
The bits that are set are bit 1 (opened_from_file), bit 3 (has_rpfix), and bit 7 (metadata_only).
Yes, wimlib-imagex ignores these flags, since I've understood them to be redundant with the image list, and potentially inconsistent with the information the WIM actually contains. Do you have a reason why you want these flags to be shown?
Hi,
depending one what kind of wim file the enduser selects
I check if there is need to look for other wim files needed to
be passed to wimlib_reference_resource_files().
Normally I check the total_parts count, but this time it was 1.
So I need the flags like Spanned or METADATA_ONLY.
Cause there are these structure members I expected to get
them filled by wimlib_get_wim_info().
Well no problem anymore, now that I know how to get them.
Great. I guess that's a valid use case, although I'd wonder if you might be better off just trying to do the extraction, and only looking for other WIM files if the extraction fails with WIMLIB_ERR_RESOURCE_NOT_FOUND.
Also I just realized that all the header flags do get shown if you run
wimlib-imagex info --header
--- they're just not shown in the defaultwimlib-imagex info
output. For the latter I'm considering consolidating the various boolean flags into a single line, similar to the ImageX output...