mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +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,
|
IN HMACHINE hMachine,
|
||||||
OUT BOOL *CanDisable)
|
OUT BOOL *CanDisable)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
/* hpoussin, Dec 2005. I've disabled this code because
|
|
||||||
* ntoskrnl never sets the DN_DISABLEABLE flag.
|
|
||||||
*/
|
|
||||||
CONFIGRET cr;
|
CONFIGRET cr;
|
||||||
ULONG Status, ProblemNumber;
|
ULONG Status, ProblemNumber;
|
||||||
BOOL Ret = FALSE;
|
BOOL Ret = FALSE;
|
||||||
|
|
||||||
cr = CM_Get_DevNode_Status_Ex(
|
cr = CM_Get_DevNode_Status_Ex(&Status,
|
||||||
&Status,
|
&ProblemNumber,
|
||||||
&ProblemNumber,
|
DevInst,
|
||||||
DevInst,
|
0,
|
||||||
0,
|
hMachine);
|
||||||
hMachine);
|
|
||||||
if (cr == CR_SUCCESS)
|
if (cr == CR_SUCCESS)
|
||||||
{
|
{
|
||||||
*CanDisable = ((Status & DN_DISABLEABLE) != 0);
|
*CanDisable = ((Status & DN_DISABLEABLE) != 0);
|
||||||
Ret = TRUE;
|
Ret = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
#else
|
|
||||||
*CanDisable = TRUE;
|
|
||||||
return TRUE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
|
|
|
@ -444,6 +444,9 @@ IopGetDeviceNodeStatus(PDEVICE_NODE DeviceNode)
|
||||||
if (DeviceNode->UserFlags & DNUF_DONT_SHOW_IN_UI)
|
if (DeviceNode->UserFlags & DNUF_DONT_SHOW_IN_UI)
|
||||||
Output |= DN_NO_SHOW_IN_DM;
|
Output |= DN_NO_SHOW_IN_DM;
|
||||||
|
|
||||||
|
if (!(DeviceNode->UserFlags & DNUF_NOT_DISABLEABLE))
|
||||||
|
Output |= DN_DISABLEABLE;
|
||||||
|
|
||||||
/* FIXME: Implement the rest */
|
/* FIXME: Implement the rest */
|
||||||
|
|
||||||
Output |= DN_NT_ENUMERATOR | DN_NT_DRIVER;
|
Output |= DN_NT_ENUMERATOR | DN_NT_DRIVER;
|
||||||
|
|
Loading…
Reference in a new issue