- Hide legacy devices and volumes by default
- Patch by Eric Kohl
CORE-10396

svn path=/trunk/; revision=69704
This commit is contained in:
Ged Murphy 2015-10-26 08:40:14 +00:00
parent dbff9a412d
commit 4b92ce00d5
2 changed files with 18 additions and 1 deletions

View file

@ -196,9 +196,14 @@ CDeviceNode::IsHidden()
NULL); NULL);
if (cr == CR_SUCCESS) if (cr == CR_SUCCESS)
{ {
return ((m_Status & DN_NO_SHOW_IN_DM) != 0); if (m_Status & DN_NO_SHOW_IN_DM)
return true;
} }
if (IsEqualGUID(*GetClassGuid(), GUID_DEVCLASS_LEGACYDRIVER) ||
IsEqualGUID(*GetClassGuid(), GUID_DEVCLASS_VOLUME))
return true;
return false; return false;
} }

View file

@ -460,6 +460,18 @@ CDeviceView::ListDevicesByType()
if (IsEqualGUID(ClassGuid, GUID_DEVCLASS_UNKNOWN)) if (IsEqualGUID(ClassGuid, GUID_DEVCLASS_UNKNOWN))
bClassUnknown = true; bClassUnknown = true;
// Check if this is a hidden class
if (IsEqualGUID(ClassGuid, GUID_DEVCLASS_LEGACYDRIVER) ||
IsEqualGUID(ClassGuid, GUID_DEVCLASS_VOLUME))
{
// Ignore this device if we aren't displaying hidden devices
if (m_ShowHidden == FALSE)
{
ClassIndex++;
continue;
}
}
do do
{ {
// Get a handle to all the devices in this class // Get a handle to all the devices in this class