Lines Matching refs:valid

505 // is valid, 2 if the backup header is valid, 3 if both are valid, and
506 // 0 if neither is valid. Note that this function checks the GPT signature,
509 int valid = 3;
517 valid -= 1;
518 } else if ((mainHeader.revision != 0x00010000) && valid) {
519 valid -= 1;
528 valid -= 2;
529 } else if ((secondHeader.revision != 0x00010000) && valid) {
530 valid -= 2;
545 return valid;
557 // computation to be valid
809 // Load the GPT data, whether or not it's valid
941 // Return valid headers code: 0 = both headers bad; 1 = main header
943 // 3 = both headers good. Note these codes refer to valid GPT
949 // GPT appears to be valid....
952 // We're calling the GPT valid, but there's a possibility that one
955 if (validHeaders == 1) { // valid main header, invalid backup header
956 cerr << "\aCaution: invalid backup GPT header, but valid main header; regenerating\n"
961 } else if (validHeaders == 2) { // valid backup header, invalid main header
962 cerr << "\aCaution: invalid main GPT header, but valid backup; regenerating main header\n"
1004 // Check for valid CRCs and warn if there are problems
1035 // main GPT header in memory MUST be valid for this call to do anything
1073 // problem either way. The warning is printed only on a valid CRC
1440 // Return valid headers code: 0 = both headers bad; 1 = main header
1442 // 3 = both headers good. Note these codes refer to valid GPT
1644 << "Found invalid GPT and valid MBR; converting MBR to GPT format\n"
1657 << "Found invalid GPT and valid BSD disklabel; converting BSD disklabel\n"
1671 cout << "Found valid GPT with protective MBR; using GPT.\n";
1676 cout << "Found valid GPT with hybrid MBR; using GPT.\n";
1679 cout << "\aFound valid GPT with corrupt MBR; using GPT and will write new\n"
2022 } else allOK = 0; // partition numbers are valid