Home | History | Annotate | Download | only in gptfdisk

Lines Matching refs:disk

206            << "problems. Think carefully before saving changes with 'w' or using this disk.\n";
212 << "at the end of the disk. If you've added a disk to a RAID array, use the 'e'\n"
246 cout << "\nProblem: main header's disk GUID (" << mainHeader.diskGUID
247 << ") doesn't\nmatch the backup GPT header's disk GUID ("
270 // Check that the disk size will hold the data...
273 cout << "\nProblem: Disk is too small to hold all the data!\n"
274 << "(Disk size is " << diskSize << " sectors, needs to be "
281 cout << "\nProblem: GPT claims the disk is larger than it is! (Claimed last usable\n"
283 << mainHeader.backupLBA << " and disk size is " << diskSize << " sectors.\n"
303 << "ignore the disk, but it is required to boot from a GPT disk on some BIOS-based\n"
312 cout << "\nPartition(s) in the protective MBR are too big for the disk! Creating a\n"
329 << "for information on disk alignment.\n";
368 // If the disk size is 0 (the default), then it means that various
383 } // Problem at start of disk
395 } // Problem at end of disk
434 // Check for an Apple disk signature
645 // big for the disk. (The latter should duplicate detection of overlaps
661 cout << "\nProblem: partition " << i + 1 << " is too big for the disk.\n";
671 * Begin functions that load data from disk or save data to disk. *
676 // the partition table to a new disk and saving backups.
683 // store disk information....
727 << "This disk appears to contain an Apple-format (APM) partition table!\n";
735 // Read GPT data from a disk.
745 << ". It will be impossible to save\nchanges to this disk's partition table!\n";
757 // store disk information....
812 cout << "Warning! Disk size is smaller than the main header indicates! Loading\n"
813 << "secondary header from the last sector of the disk! You should use 'v' to\n"
814 << "verify disk integrity, and perhaps options on the experts' menu to repair\n"
815 << "the disk.\n";
887 cerr << "Warning! One or more CRCs don't match. You should repair the disk!\n\n";
912 // Load a single GPT header (main or backup) from the specified disk device and
917 int GPTData::LoadHeader(struct GPTHeader *header, DiskIO & disk, uint64_t sector, int *crcOk) {
921 disk.Seek(sector);
922 if (disk.Read(&tempHeader, 512) != 512) {
941 // Load a partition table (either main or secondary) from the specified disk,
946 int GPTData::LoadPartitionTable(const struct GPTHeader & header, DiskIO & disk, uint64_t sector) {
950 if (disk.OpenForRead()) {
952 retval = disk.Seek(header.partitionEntriesLBA);
954 retval = disk.Seek(sector);
960 if (disk.Read(partitions, sizeOfParts) != (int) sizeOfParts) {
1022 // Writes GPT (and protective MBR) to disk. If quiet==1, moves the second
1023 // header later on the disk without asking for permission, if necessary, and
1036 cout << "The justLooking flag is set. This probably means you can't write to the disk.\n";
1040 // Check that disk is really big enough to handle the second header...
1042 cerr << "Caution! Secondary header was placed beyond the disk's limits! Moving the\n"
1057 cout << "Warning! Secondary header is placed too early on the disk! Do you want to\n"
1093 cerr << "\nPartition(s) in the protective MBR are too big for the disk! Creating a\n"
1140 // system the MBR write failed but everything else was OK (on a GPT disk under
1152 << "MIGHT be harmless, or the disk might be damaged! Checking it is advisable.\n";
1189 // MBR write closed disk, so re-open and seek to end....
1219 int GPTData::SaveHeader(struct GPTHeader *header, DiskIO & disk, uint64_t sector) {
1225 if (disk.Seek(sector)) {
1226 if (disk.Write(header, 512) == -1)
1228 } else allOK = 0; // if (disk.Seek()...)
1239 int GPTData::SavePartitionTable(DiskIO & disk, uint64_t sector) {
1243 if (disk.Seek(sector)) {
1246 if (disk.Write(partitions, mainHeader.sizeOfPartitionEntries * numParts) == -1)
1296 cout << "Warning! Current disk size doesn't match that of the backup!\n"
1325 // This function destroys the on-disk GPT structures, but NOT the on-disk
1379 cout << "GPT data structures destroyed! You may now partition the disk using fdisk or\n"
1388 // Wipe MBR data from the disk (zero it out completely)
1434 cout << "Disk " << device << ": " << diskSize << " sectors, "
1437 cout << "Disk identifier (GUID): " << mainHeader.diskGUID << "\n";
1526 << "Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk\n"
1532 } // if/else MBR says disk is GPT
1568 // when doing a disk verification
1627 // when doing a disk verification
1832 // program was launched on an MBR disk, and those may need to be
1858 // Now some semi-static items (computed based on end of disk)
1862 // Set a unique GUID for the disk, based on random numbers
1880 // Set the location of the second GPT header data to the end of the disk.
1881 // If the disk size has actually changed, this also adjusts the protective
1884 // transformation menu, to help users of RAID arrays who add disk space
1915 // Set the disk GUID to the specified value. Note that the header CRCs must
1937 // Set new random GUIDs for the disk and all partitions. Intended to be used
1938 // after disk cloning or similar operations that don't randomize the GUIDs.
2081 * Functions that return data about disk free space *
2120 // space on the disk. Returns 0 if there are no available blocks left
2140 // Find the last available block on the disk.
2271 // and the disk is bigger than SMALLEST_ADVANCED_FORMAT, resets it to 8. This
2361 // Return (not for modification!) the disk's GUID value