* Don't try to update the DMAResource in case there is no medium (also saves

a panic when ejecting a disc, since updating DMAResource isn't implemented
  yet...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28348 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-10-27 16:00:43 +00:00
parent 34034cf61b
commit 887be5801a

View File

@ -863,6 +863,12 @@ cd_set_capacity(cd_driver_info* info, uint64 capacity, uint32 blockSize)
info->capacity = capacity;
if (info->block_size != blockSize) {
if (capacity == 0) {
// there is obviously no medium in the drive, don't try to update
// the DMA resource
return;
}
if (info->block_size != 0) {
dprintf("old %ld, new %ld\n", info->block_size, blockSize);
panic("updating DMAResource not yet implemented...");