* specify an array of pointers to the WIMStruct's for additional split WIM parts.
*
* The reason we join the lookup tables is so we only have to search one lookup
* table to find the location of a resource in the entire WIM.
*/
void
* specify an array of pointers to the WIMStruct's for additional split WIM parts.
*
* The reason we join the lookup tables is so we only have to search one lookup
* table to find the location of a resource in the entire WIM.
*/
void
WIMStruct **additional_swms,
unsigned num_additional_swms)
{
for (unsigned i = 0; i < num_additional_swms; i++)
WIMStruct **additional_swms,
unsigned num_additional_swms)
{
for (unsigned i = 0; i < num_additional_swms; i++)
* verify_swm_set: - Sanity checks to make sure a set of WIMs correctly
* correspond to a spanned set.
*
* verify_swm_set: - Sanity checks to make sure a set of WIMs correctly
* correspond to a spanned set.
*
int ctype;
const u8 *guid;
if (total_parts != num_additional_swms + 1) {
ERROR("`%"TS"' says there are %u parts in the spanned set, "
"but %"TS"%u part%"TS" provided",
int ctype;
const u8 *guid;
if (total_parts != num_additional_swms + 1) {
ERROR("`%"TS"' says there are %u parts in the spanned set, "
"but %"TS"%u part%"TS" provided",
(num_additional_swms + 1 < total_parts) ? T("only ") : T(""),
num_additional_swms + 1,
(num_additional_swms) ? T("s were") : T(" was"));
return WIMLIB_ERR_SPLIT_INVALID;
}
(num_additional_swms + 1 < total_parts) ? T("only ") : T(""),
num_additional_swms + 1,
(num_additional_swms) ? T("s were") : T(" was"));
return WIMLIB_ERR_SPLIT_INVALID;
}
{
/* parts_to_swms is not allocated at function scope because it
* should only be allocated after num_additional_swms was
{
/* parts_to_swms is not allocated at function scope because it
* should only be allocated after num_additional_swms was
* could be unexpectedly high and cause a stack overflow. */
WIMStruct *parts_to_swms[num_additional_swms];
ZERO_ARRAY(parts_to_swms);
* could be unexpectedly high and cause a stack overflow. */
WIMStruct *parts_to_swms[num_additional_swms];
ZERO_ARRAY(parts_to_swms);
if (swm->hdr.part_number == 1) {
ERROR("WIMs `%"TS"' and `%"TS"' both are marked "
"as the first WIM in the spanned set",
if (swm->hdr.part_number == 1) {
ERROR("WIMs `%"TS"' and `%"TS"' both are marked "
"as the first WIM in the spanned set",