if (!memcmp(&part_info->Gpt.PartitionId,
&drive_info->Gpt.DiskId,
sizeof(drive_info->Gpt.DiskId)))
if (!memcmp(&part_info->Gpt.PartitionId,
&drive_info->Gpt.DiskId,
sizeof(drive_info->Gpt.DiskId)))
fill_in_wimoverlay_dat(u8 *buf,
const struct WimOverlay_dat_header *old_hdr,
const wchar_t *wim_path,
fill_in_wimoverlay_dat(u8 *buf,
const struct WimOverlay_dat_header *old_hdr,
const wchar_t *wim_path,
new_entry_1->entry_2_length = new_entry_2_size;
new_entry_1->wim_type = WIM_BOOT_NOT_OS_WIM;
new_entry_1->wim_index = image;
new_entry_1->entry_2_length = new_entry_2_size;
new_entry_1->wim_type = WIM_BOOT_NOT_OS_WIM;
new_entry_1->wim_index = image;
- BUILD_BUG_ON(sizeof(new_entry_1->guid) != WIM_GUID_LEN);
- memcpy(new_entry_1->guid, wim_guid, WIM_GUID_LEN);
+ STATIC_ASSERT(sizeof(new_entry_1->guid) == GUID_SIZE);
+ copy_guid(new_entry_1->guid, wim_guid);
- BUILD_BUG_ON(sizeof(new_entry_2->partition.gpt.part_unique_guid) !=
- sizeof(part_info->Gpt.PartitionId));
+ STATIC_ASSERT(sizeof(new_entry_2->partition.gpt.part_unique_guid) ==
+ sizeof(part_info->Gpt.PartitionId));
memcpy(new_entry_2->partition.gpt.part_unique_guid,
&part_info->Gpt.PartitionId,
sizeof(part_info->Gpt.PartitionId));
new_entry_2->partition_table_type = WIMOVERLAY_PARTITION_TYPE_GPT;
memcpy(new_entry_2->partition.gpt.part_unique_guid,
&part_info->Gpt.PartitionId,
sizeof(part_info->Gpt.PartitionId));
new_entry_2->partition_table_type = WIMOVERLAY_PARTITION_TYPE_GPT;
memcpy(new_entry_2->disk.gpt.disk_guid,
&disk_info->Gpt.DiskId,
sizeof(disk_info->Gpt.DiskId));
memcpy(new_entry_2->disk.gpt.disk_guid,
&disk_info->Gpt.DiskId,
sizeof(disk_info->Gpt.DiskId));
- BUILD_BUG_ON(sizeof(new_entry_2->disk.gpt.disk_guid) !=
- sizeof(new_entry_2->partition.gpt.part_unique_guid));
+ STATIC_ASSERT(sizeof(new_entry_2->disk.gpt.disk_guid) ==
+ sizeof(new_entry_2->partition.gpt.part_unique_guid));
int image, u64 *data_source_id_ret)
{
wchar_t path_main[] = L"A:\\System Volume Information\\WimOverlay.dat";
int image, u64 *data_source_id_ret)
{
wchar_t path_main[] = L"A:\\System Volume Information\\WimOverlay.dat";
int image, const wchar_t *target,
u64 *data_source_id_ret, bool *wof_running_ret)
{
int image, const wchar_t *target,
u64 *data_source_id_ret, bool *wof_running_ret)
{
- BUILD_BUG_ON(sizeof(in) != 8 +
- sizeof(struct wof_external_info) +
- sizeof(struct wim_provider_rpdata));
+ STATIC_ASSERT(sizeof(in) == 8 +
+ sizeof(struct wof_external_info) +
+ sizeof(struct wim_provider_rpdata));
in.wim_info.data_source_id = data_source_id;
copy_hash(in.wim_info.unnamed_data_stream_hash, blob->hash);
copy_hash(in.wim_info.blob_table_hash, blob_table_hash);
in.wim_info.data_source_id = data_source_id;
copy_hash(in.wim_info.unnamed_data_stream_hash, blob->hash);
copy_hash(in.wim_info.blob_table_hash, blob_table_hash);
- in.wim_info.unnamed_data_stream_uncompressed_size = blob->size;
- in.wim_info.unnamed_data_stream_compressed_size = blob->rdesc->size_in_wim;
+ in.wim_info.unnamed_data_stream_size = blob->size;
+ in.wim_info.unnamed_data_stream_size_in_wim = blob->rdesc->size_in_wim;
in.wim_info.unnamed_data_stream_offset_in_wim = blob->rdesc->offset_in_wim;
if (!DeviceIoControl(h, FSCTL_SET_REPARSE_POINT,
in.wim_info.unnamed_data_stream_offset_in_wim = blob->rdesc->offset_in_wim;
if (!DeviceIoControl(h, FSCTL_SET_REPARSE_POINT,