mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[NTOSKRNL]
- Set DN_DISABLEABLE if the device can be disabled [NEWDEV] - Remove a hack needed because DN_DISABLEABLE was never set svn path=/trunk/; revision=56241
This commit is contained in:
parent
05abf4495a
commit
573aa31c4b
2 changed files with 9 additions and 15 deletions
|
@ -55,31 +55,22 @@ CanDisableDevice(
|
|||
IN HMACHINE hMachine,
|
||||
OUT BOOL *CanDisable)
|
||||
{
|
||||
#if 0
|
||||
/* hpoussin, Dec 2005. I've disabled this code because
|
||||
* ntoskrnl never sets the DN_DISABLEABLE flag.
|
||||
*/
|
||||
CONFIGRET cr;
|
||||
ULONG Status, ProblemNumber;
|
||||
BOOL Ret = FALSE;
|
||||
|
||||
cr = CM_Get_DevNode_Status_Ex(
|
||||
&Status,
|
||||
&ProblemNumber,
|
||||
DevInst,
|
||||
0,
|
||||
hMachine);
|
||||
cr = CM_Get_DevNode_Status_Ex(&Status,
|
||||
&ProblemNumber,
|
||||
DevInst,
|
||||
0,
|
||||
hMachine);
|
||||
if (cr == CR_SUCCESS)
|
||||
{
|
||||
*CanDisable = ((Status & DN_DISABLEABLE) != 0);
|
||||
Ret = TRUE;
|
||||
Ret = TRUE;
|
||||
}
|
||||
|
||||
return Ret;
|
||||
#else
|
||||
*CanDisable = TRUE;
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
static BOOL
|
||||
|
|
|
@ -444,6 +444,9 @@ IopGetDeviceNodeStatus(PDEVICE_NODE DeviceNode)
|
|||
if (DeviceNode->UserFlags & DNUF_DONT_SHOW_IN_UI)
|
||||
Output |= DN_NO_SHOW_IN_DM;
|
||||
|
||||
if (!(DeviceNode->UserFlags & DNUF_NOT_DISABLEABLE))
|
||||
Output |= DN_DISABLEABLE;
|
||||
|
||||
/* FIXME: Implement the rest */
|
||||
|
||||
Output |= DN_NT_ENUMERATOR | DN_NT_DRIVER;
|
||||
|
|
Loading…
Reference in a new issue