Lines Matching refs:h2

300 	GptHeader *h2 = (GptHeader *)gpt->secondary_header;  in HeaderSameTest()  local
303 EXPECT(0 == HeaderFieldsSame(h1, h2)); in HeaderSameTest()
305 Memcpy(&h3, h2, sizeof(h3)); in HeaderSameTest()
309 Memcpy(&h3, h2, sizeof(h3)); in HeaderSameTest()
313 Memcpy(&h3, h2, sizeof(h3)); in HeaderSameTest()
317 Memcpy(&h3, h2, sizeof(h3)); in HeaderSameTest()
321 Memcpy(&h3, h2, sizeof(h3)); in HeaderSameTest()
325 Memcpy(&h3, h2, sizeof(h3)); in HeaderSameTest()
329 Memcpy(&h3, h2, sizeof(h3)); in HeaderSameTest()
333 Memcpy(&h3, h2, sizeof(h3)); in HeaderSameTest()
337 Memcpy(&h3, h2, sizeof(h3)); in HeaderSameTest()
341 Memcpy(&h3, h2, sizeof(h3)); in HeaderSameTest()
353 GptHeader *h2 = (GptHeader *)gpt->secondary_header; in SignatureTest() local
361 h2->signature[i] ^= 0xff; in SignatureTest()
364 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in SignatureTest()
378 GptHeader *h2 = (GptHeader *)gpt->secondary_header; in RevisionTest() local
395 h2->revision = cases[i].value_to_test; in RevisionTest()
400 EXPECT(CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0) == in RevisionTest()
410 GptHeader *h2 = (GptHeader *)gpt->secondary_header; in SizeTest() local
428 h2->size = cases[i].value_to_test; in SizeTest()
433 EXPECT(CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0) == in SizeTest()
444 GptHeader *h2 = (GptHeader *)gpt->secondary_header; in CrcFieldTest() local
449 h2->entries_crc32++; in CrcFieldTest()
451 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in CrcFieldTest()
455 EXPECT(0 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in CrcFieldTest()
465 GptHeader *h2 = (GptHeader *)gpt->secondary_header; in ReservedFieldsTest() local
469 h2->reserved_zero ^= 0x12345678; /* whatever random */ in ReservedFieldsTest()
472 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in ReservedFieldsTest()
478 h2->padding[56] ^= 0x78; /* whatever random */ in ReservedFieldsTest()
481 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in ReservedFieldsTest()
494 GptHeader *h2 = (GptHeader *)gpt->secondary_header; in SizeOfPartitionEntryTest() local
512 h2->size_of_entry = cases[i].value_to_test; in SizeOfPartitionEntryTest()
515 h2->number_of_entries = TOTAL_ENTRIES_SIZE / in SizeOfPartitionEntryTest()
521 EXPECT(CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0) == in SizeOfPartitionEntryTest()
536 GptHeader *h2 = (GptHeader *)gpt->secondary_header; in NumberOfPartitionEntriesTest() local
540 h2->number_of_entries /= 2; in NumberOfPartitionEntriesTest()
542 h2->entries_lba = h2->my_lba - CalculateEntriesSectors(h2); in NumberOfPartitionEntriesTest()
545 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in NumberOfPartitionEntriesTest()
548 …EXPECT(0 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, GPT_FLAG_EXTE… in NumberOfPartitionEntriesTest()
559 GptHeader *h2 = (GptHeader *)gpt->secondary_header; in MyLbaTest() local
564 EXPECT(1 == CheckHeader(h2, 0, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
568 h2->my_lba--; in MyLbaTest()
571 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
575 h2->my_lba--; in MyLbaTest()
578 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
583 h2->alternate_lba++; in MyLbaTest()
586 EXPECT(0 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
590 h2->alternate_lba--; in MyLbaTest()
593 EXPECT(0 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
597 h2->entries_lba++; in MyLbaTest()
608 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
612 h2->entries_lba--; in MyLbaTest()
615 EXPECT(1 == CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0)); in MyLbaTest()
629 GptHeader *h2 = (GptHeader *)gpt->secondary_header; in FirstUsableLbaAndLastUsableLbaTest() local
659 h2->entries_lba = cases[i].secondary_entries_lba; in FirstUsableLbaAndLastUsableLbaTest()
660 h2->first_usable_lba = cases[i].secondary_first_usable_lba; in FirstUsableLbaAndLastUsableLbaTest()
661 h2->last_usable_lba = cases[i].secondary_last_usable_lba; in FirstUsableLbaAndLastUsableLbaTest()
666 EXPECT(CheckHeader(h2, 1, gpt->streaming_drive_sectors, gpt->gpt_drive_sectors, 0) == in FirstUsableLbaAndLastUsableLbaTest()