This instance will be upgraded to Heptapod 0.20.1 on 2020-03-08 at 14:00 UTC+1 (10 minutes of downtime)

Commit 45e6a7b3 authored by Gleb Popov's avatar Gleb Popov

Ignore CREATE and DESTROY events for VirtualBox CD-ROM device. These seem to be

bugged and are reported in succession when the disk gets ejected.
parent d1d46a7bc8b3
......@@ -75,10 +75,9 @@ void ObjectManager::filesystemAdded(Block* b, QString fs, const ZFSInfo* zfsInfo
void ObjectManager::addBlock(QString dev)
{
// CD ROM on VirtualBox does strange things, so apply a hack for now
if(auto* drive = m_driveObjects.value(dev, nullptr))
if(auto* drive = m_driveObjects.value(dev))
{
if(drive->vendor() == "VBOX CD-ROM")
if(drive->vendor() == "VBOX CD-ROM" && m_blockObjects.contains(dev))
return;
}
......@@ -116,8 +115,7 @@ void ObjectManager::updateBlock(QString dev)
void ObjectManager::removeBlock(QString dev)
{
// CD ROM on VirtualBox does strange things, so apply a hack for now
if(auto* drive = m_driveObjects.value(dev, nullptr))
if(auto* drive = m_driveObjects.value(dev))
{
if(drive->vendor() == "VBOX CD-ROM")
return;
......@@ -160,13 +158,6 @@ void ObjectManager::removeBlock(QString dev)
void ObjectManager::addDrive(QString dev)
{
// CD ROM on VirtualBox does strange things, so apply a hack for now
if(auto* drive = m_driveObjects.value(dev, nullptr))
{
if(drive->vendor() == "VBOX CD-ROM")
return;
}
Q_ASSERT(!m_driveObjects.contains(dev));
qDebug() << "Created drive " << dev;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment