* 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:
@@ -863,6 +863,12 @@ cd_set_capacity(cd_driver_info* info, uint64 capacity, uint32 blockSize)
|
|||||||
info->capacity = capacity;
|
info->capacity = capacity;
|
||||||
|
|
||||||
if (info->block_size != blockSize) {
|
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) {
|
if (info->block_size != 0) {
|
||||||
dprintf("old %ld, new %ld\n", info->block_size, blockSize);
|
dprintf("old %ld, new %ld\n", info->block_size, blockSize);
|
||||||
panic("updating DMAResource not yet implemented...");
|
panic("updating DMAResource not yet implemented...");
|
||||||
|
|||||||
Reference in New Issue
Block a user