Lines Matching +full:- +full:- +full:disk
4 // Description: Class to handle low-level disk I/O for GPT fdisk
56 // Open the currently on-record file for reading. Returns 1 if the file is
73 if (fd == -1) { in OpenForRead()
118 // An extended file-open function. This includes some system-specific checks.
124 // Close the disk, in case it's already open for reading only.... in OpenForWrite()
146 // Close the disk device. Note that this does NOT erase the stored filenames,
147 // so the file can be re-opened without specifying the filename.
158 // (512). If the disk can't be opened at all, return a value of 0.
160 int err = -1, blockSize = 0; in GetBlockSize()
165 // If disk isn't open, try to open it.... in GetBlockSize()
186 if (err == -1) { in GetBlockSize()
188 // ENOTTY = inappropriate ioctl; probably being called on a disk image in GetBlockSize()
190 // 32-bit code returns EINVAL, I don't know why. I know I'm treading on in GetBlockSize()
195 cout << "Disk device is " << realFilename << "\n"; in GetBlockSize()
197 } // if (err == -1) in GetBlockSize()
207 int err = -1, physBlockSize = 0; in GetPhysBlockSize()
209 // If disk isn't open, try to open it.... in GetPhysBlockSize()
219 if (err == -1) in GetPhysBlockSize()
232 // If disk isn't open, try to open it.... in GetNumHeads()
250 // If disk isn't open, try to open it.... in GetNumSecsPerTrack()
260 // Resync disk caches so the OS uses the new partition table. This code varies
268 // If disk isn't open, try to open it.... in DiskSync()
279 * it definitely will get things on disk though: in DiskSync()
280 * http://topiks.org/mac-os-x/0321278542/ch12lev1sec8.html */ in DiskSync()
322 // If disk isn't open, try to open it.... in Seek()
345 // If disk isn't open, try to open it.... in Read()
388 // If disk isn't open, try to open it.... in Write()
434 // return correct values for disk image files.
444 // If disk isn't open, try to open it.... in DiskSize()
452 // on Linux, but I had some problems. IIRC, it ran OK on 32-bit in DiskSize()
453 // systems but not on 64-bit. Keep this in mind in case of in DiskSize()
454 // 32/64-bit issues on MacOS.... in DiskSize()
485 // Unintuitively, the above returns values in 512-byte blocks, no in DiskSize()
496 if ((sectors == 0) || (*err == -1)) { in DiskSize()