By popular request: Change the invalid device number and add a comment
explaining the reasons behind it. Oh well, at least the commit count raises... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30644 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -293,7 +293,11 @@ ATAChannel::SelectedDevice()
|
|||||||
ata_task_file taskFile;
|
ata_task_file taskFile;
|
||||||
if (_ReadRegs(&taskFile, ATA_MASK_DEVICE_HEAD) != B_OK) {
|
if (_ReadRegs(&taskFile, ATA_MASK_DEVICE_HEAD) != B_OK) {
|
||||||
TRACE_ERROR("reading register failed when detecting selected device\n");
|
TRACE_ERROR("reading register failed when detecting selected device\n");
|
||||||
return 2;
|
// Return an invalid device number so that the
|
||||||
|
// SelectedDevice() == "expected device" check fails.
|
||||||
|
// Due to the device number being a bit, we can't really get values
|
||||||
|
// other than 0 and 1, so anything >= 2 can be regarded as invalid.
|
||||||
|
return 234;
|
||||||
}
|
}
|
||||||
|
|
||||||
return taskFile.lba.device;
|
return taskFile.lba.device;
|
||||||
|
|||||||
Reference in New Issue
Block a user