Lines Matching defs:drive

196 read_bpb(uint8 drive, struct tos_bpb *bpb)
199 p = Getbpb(drive);
203 Mediach(drive);
208 get_drive_parameters(uint8 drive, drive_parameters *parameters)
211 err = read_bpb(drive, &parameters->bpb);
237 /** parse EDD 3.0 drive path information */
295 /** EDD 2.0 drive table information */
325 // Try some data in the first part of the drive
341 compute_check_sum(BlockHandle *drive, off_t offset)
344 ssize_t bytesRead = drive->ReadAt(NULL, offset, buffer, sizeof(buffer));
377 BlockHandle *drive = (BlockHandle *)device;
380 BlockHandle *drive = dynamic_cast<BlockHandle *>(device);
381 if (drive == NULL)
387 if (drive->Identifier().device_type != UNKNOWN_DEVICE)
390 if (minSize == 0 || drive->Size() < minSize)
391 minSize = drive->Size();
399 if (compareDrive == drive
403 if (!memcmp(&drive->Identifier(), &compareDrive->Identifier(),
426 BlockHandle *drive = (BlockHandle *)device;
428 disk_identifier& disk = drive->Identifier();
430 disk.device.unknown.check_sums[i].sum = compute_check_sum(drive, offset);
432 TRACE(("disk %x, offset %lld, sum %lu\n", drive->DriveID(), offset,
530 BlockHandle *drive = new(nothrow) XHDIDrive(driveID, major, minor);
531 if (drive->InitCheck() != B_OK) {
532 dprintf("could not add drive (%d,%d)\n", major, minor);
533 delete drive;
537 devicesList->Add(drive);
540 if (drive->FillIdentifier() != B_OK)
557 BlockHandle *drive = new(nothrow) BlockHandle(driveID);
558 if (drive->InitCheck() != B_OK) {
559 dprintf("could not add drive %u\n", driveID);
560 delete drive;
564 devicesList->Add(drive);
567 if (drive->FillIdentifier() != B_OK)
594 TRACE(("BlockHandle::%s(): drive ID %u\n", __FUNCTION__, fHandle));
694 /* first check if the drive exists */
704 dprintf("getting drive parameters for: %u failed!\n", fHandle);
726 dprintf("getting drive parameters for: %u failed!\n", fDriveID);
875 /* first check if the drive exists */
885 dprintf("getting drive parameters for: %u failed!\n", fHandle);
897 dprintf("getting drive parameters for: %u failed!\n", fDriveID);
1000 /* first check if the drive exists */
1027 dprintf("getting drive parameters for: %u failed!\n", fHandle);
1039 dprintf("getting drive parameters for: %u failed!\n", fDriveID);
1135 TRACE(("boot drive ID: %x API: %d\n", gBootDriveID, gBootDriveAPI));
1139 //BlockHandle *drive = new(nothrow) BlockHandle(gBootDriveID);
1140 BlockHandle *drive;
1143 drive = new(nothrow) FloppyDrive(gBootDriveID);
1147 drive = new(nothrow) DMADrive(gBootDriveID);
1151 drive = new(nothrow) XHDIDrive(gBootDriveID, gBootDriveID, 0);
1161 drive = new(nothrow) XHDIDrive(gBootDriveID, gBootDriveID, 0);
1166 dprintf("unknown boot drive API %d\n", gBootDriveAPI);
1168 drive = new(nothrow) BIOSDrive(gBootDriveID);
1171 if (drive == NULL || drive->InitCheck() != B_OK) {
1172 dprintf("no boot drive!\n");
1176 devicesList->Add(drive);
1178 if (drive->FillIdentifier() != B_OK) {
1184 TRACE(("boot drive size: %lld bytes\n", drive->Size()));
1195 BlockHandle *drive = static_cast<BlockHandle *>(bootDevice);
1196 off_t offset = (off_t)gBootPartitionOffset * drive->BlockSize();
1228 BlockHandle *drive = (BlockHandle *)device;
1231 check_cd_boot(drive);
1234 gBootVolume.SetInt64("boot drive number", drive->DriveID());
1236 &drive->Identifier(), sizeof(disk_identifier));