Lines Matching refs:disk

254            << "problems. Think carefully before saving changes with 'w' or using this disk.\n";
260 << "at the end of the disk. If you've added a disk to a RAID array, use the 'e'\n"
294 cout << "\nProblem: main header's disk GUID (" << mainHeader.diskGUID
295 << ") doesn't\nmatch the backup GPT header's disk GUID ("
318 // Check that the disk size will hold the data...
335 cout << "\nProblem: Main partition table appears impossibly early on the disk.\n"
375 cout << "\nProblem: GPT claims the disk is larger than it is! (Claimed last usable\n"
377 << mainHeader.backupLBA << " and disk size is " << diskSize << " sectors.\n"
397 << "ignore the disk, but it is required to boot from a GPT disk on some BIOS-based\n"
406 cout << "\nPartition(s) in the protective MBR are too big for the disk! Creating a\n"
428 << "in problems with some disk encryption tools.\n";
433 << "for information on disk alignment.\n";
472 // If the disk size is 0 (the default), then it means that various
487 } // Problem at start of disk
499 } // Problem at end of disk
538 // Check for an Apple disk signature
749 // big for the disk. (The latter should duplicate detection of overlaps
765 cout << "\nProblem: partition " << i + 1 << " is too big for the disk.\n";
775 * Begin functions that load data from disk or save data to disk. *
780 // the partition table to a new disk and saving backups.
787 // store disk information....
832 << "This disk appears to contain an Apple-format (APM) partition table!\n";
840 // Read GPT data from a disk.
851 << ". It will be impossible to save\nchanges to this disk's partition table!\n";
869 // store disk information....
934 << "secondary header from the last sector of the disk! You should use 'v' to\n"
935 << "verify disk integrity, and perhaps options on the experts' menu to repair\n"
936 << "the disk.\n";
1007 cerr << "Warning! One or more CRCs don't match. You should repair the disk!\n";
1050 // Load a single GPT header (main or backup) from the specified disk device and
1055 int GPTData::LoadHeader(struct GPTHeader *header, DiskIO & disk, uint64_t sector, int *crcOk) {
1059 disk.Seek(sector);
1060 if (disk.Read(&tempHeader, 512) != 512) {
1095 // Load a partition table (either main or secondary) from the specified disk,
1100 int GPTData::LoadPartitionTable(const struct GPTHeader & header, DiskIO & disk, uint64_t sector) {
1107 } else if (disk.OpenForRead()) {
1109 retval = disk.Seek(header.partitionEntriesLBA);
1111 retval = disk.Seek(sector);
1117 if (disk.Read(partitions, sizeOfParts) != (int) sizeOfParts) {
1179 // Writes GPT (and protective MBR) to disk. If quiet==1, moves the second
1180 // header later on the disk without asking for permission, if necessary, and
1193 cout << "The justLooking flag is set. This probably means you can't write to the disk.\n";
1197 // Check that disk is really big enough to handle the second header...
1199 cerr << "Caution! Secondary header was placed beyond the disk's limits! Moving the\n"
1214 cout << "Warning! Secondary header is placed too early on the disk! Do you want to\n"
1250 cerr << "\nPartition(s) in the protective MBR are too big for the disk! Creating a\n"
1297 // system the MBR write failed but everything else was OK (on a GPT disk under
1309 << "MIGHT be harmless, or the disk might be damaged! Checking it is advisable.\n";
1346 // MBR write closed disk, so re-open and seek to end....
1376 int GPTData::SaveHeader(struct GPTHeader *header, DiskIO & disk, uint64_t sector) {
1382 if (disk.Seek(sector)) {
1383 if (disk.Write(header, 512) == -1)
1385 } else allOK = 0; // if (disk.Seek()...)
1396 int GPTData::SavePartitionTable(DiskIO & disk, uint64_t sector) {
1400 if (disk.Seek(sector)) {
1403 if (disk.Write(partitions, mainHeader.sizeOfPartitionEntries * numParts) == -1)
1453 cout << "Warning! Current disk size doesn't match that of the backup!\n"
1482 // This function destroys the on-disk GPT structures, but NOT the on-disk
1536 cout << "GPT data structures destroyed! You may now partition the disk using fdisk or\n"
1545 // Wipe MBR data from the disk (zero it out completely)
1690 << "Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk\n"
1696 } // if/else MBR says disk is GPT
1732 // when doing a disk verification
1791 // when doing a disk verification
2030 // program was launched on an MBR disk, and those may need to be
2057 // Now some semi-static items (computed based on end of disk)
2061 // Set a unique GUID for the disk, based on random numbers
2079 // Set the location of the second GPT header data to the end of the disk.
2080 // If the disk size has actually changed, this also adjusts the protective
2083 // transformation menu, to help users of RAID arrays who add disk space
2114 // Set the disk GUID to the specified value. Note that the header CRCs must
2136 // Set new random GUIDs for the disk and all partitions. Intended to be used
2137 // after disk cloning or similar operations that don't randomize the GUIDs.
2278 * Functions that return data about disk free space *
2316 // Returns the LBA of the start of the first partition on the disk (by
2330 // Returns the LBA of the end of the last partition on the disk (by
2345 // space on the disk. Returns 0 if there are no available blocks left
2365 // Find the last available block on the disk.
2501 cout << "Warning: Setting alignment to a value that does not match the disk's\n"
2517 // and the disk is bigger than SMALLEST_ADVANCED_FORMAT, resets it to 8. This
2607 // Return (not for modification!) the disk's GUID value