Lines Matching defs:disk

211            << "problems. Think carefully before saving changes with 'w' or using this disk.\n";
217 << "at the end of the disk. If you've added a disk to a RAID array, use the 'e'\n"
251 cout << "\nProblem: main header's disk GUID (" << mainHeader.diskGUID
252 << ") doesn't\nmatch the backup GPT header's disk GUID ("
275 // Check that the disk size will hold the data...
286 cout << "\nProblem: GPT claims the disk is larger than it is! (Claimed last usable\n"
288 << mainHeader.backupLBA << " and disk size is " << diskSize << " sectors.\n"
308 << "ignore the disk, but it is required to boot from a GPT disk on some BIOS-based\n"
317 cout << "\nPartition(s) in the protective MBR are too big for the disk! Creating a\n"
334 << "for information on disk alignment.\n";
373 // If the disk size is 0 (the default), then it means that various
388 } // Problem at start of disk
400 } // Problem at end of disk
439 // Check for an Apple disk signature
650 // big for the disk. (The latter should duplicate detection of overlaps
666 cout << "\nProblem: partition " << i + 1 << " is too big for the disk.\n";
676 * Begin functions that load data from disk or save data to disk. *
681 // the partition table to a new disk and saving backups.
688 // store disk information....
732 << "This disk appears to contain an Apple-format (APM) partition table!\n";
740 // Read GPT data from a disk.
750 << ". It will be impossible to save\nchanges to this disk's partition table!\n";
762 // store disk information....
818 << "secondary header from the last sector of the disk! You should use 'v' to\n"
819 << "verify disk integrity, and perhaps options on the experts' menu to repair\n"
820 << "the disk.\n";
892 cerr << "Warning! One or more CRCs don't match. You should repair the disk!\n\n";
917 // Load a single GPT header (main or backup) from the specified disk device and
922 int GPTData::LoadHeader(struct GPTHeader *header, DiskIO & disk, uint64_t sector, int *crcOk) {
926 disk.Seek(sector);
927 if (disk.Read(&tempHeader, 512) != 512) {
946 // Load a partition table (either main or secondary) from the specified disk,
951 int GPTData::LoadPartitionTable(const struct GPTHeader & header, DiskIO & disk, uint64_t sector) {
955 if (disk.OpenForRead()) {
957 retval = disk.Seek(header.partitionEntriesLBA);
959 retval = disk.Seek(sector);
965 if (disk.Read(partitions, sizeOfParts) != (int) sizeOfParts) {
1027 // Writes GPT (and protective MBR) to disk. If quiet==1, moves the second
1028 // header later on the disk without asking for permission, if necessary, and
1041 cout << "The justLooking flag is set. This probably means you can't write to the disk.\n";
1045 // Check that disk is really big enough to handle the second header...
1047 cerr << "Caution! Secondary header was placed beyond the disk's limits! Moving the\n"
1062 cout << "Warning! Secondary header is placed too early on the disk! Do you want to\n"
1098 cerr << "\nPartition(s) in the protective MBR are too big for the disk! Creating a\n"
1145 // system the MBR write failed but everything else was OK (on a GPT disk under
1157 << "MIGHT be harmless, or the disk might be damaged! Checking it is advisable.\n";
1194 // MBR write closed disk, so re-open and seek to end....
1224 int GPTData::SaveHeader(struct GPTHeader *header, DiskIO & disk, uint64_t sector) {
1230 if (disk.Seek(sector)) {
1231 if (disk.Write(header, 512) == -1)
1233 } else allOK = 0; // if (disk.Seek()...)
1244 int GPTData::SavePartitionTable(DiskIO & disk, uint64_t sector) {
1248 if (disk.Seek(sector)) {
1251 if (disk.Write(partitions, mainHeader.sizeOfPartitionEntries * numParts) == -1)
1301 cout << "Warning! Current disk size doesn't match that of the backup!\n"
1330 // This function destroys the on-disk GPT structures, but NOT the on-disk
1386 cout << "GPT data structures destroyed! You may now partition the disk using fdisk or\n"
1395 // Wipe MBR data from the disk (zero it out completely)
1533 << "Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk\n"
1539 } // if/else MBR says disk is GPT
1575 // when doing a disk verification
1634 // when doing a disk verification
1839 // program was launched on an MBR disk, and those may need to be
1865 // Now some semi-static items (computed based on end of disk)
1869 // Set a unique GUID for the disk, based on random numbers
1887 // Set the location of the second GPT header data to the end of the disk.
1888 // If the disk size has actually changed, this also adjusts the protective
1891 // transformation menu, to help users of RAID arrays who add disk space
1922 // Set the disk GUID to the specified value. Note that the header CRCs must
1944 // Set new random GUIDs for the disk and all partitions. Intended to be used
1945 // after disk cloning or similar operations that don't randomize the GUIDs.
2088 * Functions that return data about disk free space *
2127 // space on the disk. Returns 0 if there are no available blocks left
2147 // Find the last available block on the disk.
2278 // and the disk is bigger than SMALLEST_ADVANCED_FORMAT, resets it to 8. This
2368 // Return (not for modification!) the disk's GUID value