if (DeviceExtension->PowerInterfaceName.MaximumLength == 0)
{
- /* We have never registred this interface ; do it */
+ /* We have never registered this interface ; do it */
Status = IoRegisterDeviceInterface(
DeviceExtension->Common.Pdo,
&GUID_DEVICE_SYS_BUTTON,
return;
}
}
- /* Enable the interface. This leads to receving a IOCTL_GET_SYS_BUTTON_CAPS,
+ /* Enable the interface. This leads to receiving a IOCTL_GET_SYS_BUTTON_CAPS,
* so we can report new capability */
Status = IoSetDeviceInterfaceState(
&DeviceExtension->PowerInterfaceName,
}
}
- Irp->IoStatus.Status = Status;
- if (Status == STATUS_PENDING)
- IoMarkIrpPending(Irp);
- else
+ if (Status != STATUS_PENDING)
+ {
+ Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
+ }
return Status;
}
}
}
- Irp->IoStatus.Status = Status;
if (Status != STATUS_PENDING)
+ {
+ Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
+ }
return Status;
}
if (InputData->MakeCode == 0x25)
{
/* k - Breakpoint */
- DbgBreakPoint();
+ DbgBreakPointWithStatus(DBG_STATUS_SYSRQ);
}
else if (InputData->MakeCode == 0x30)
{
/* b - Bugcheck */
KeBugCheck(MANUALLY_INITIATED_CRASH);
}
+#if defined(KDBG)
else
{
/* Send request to the kernel debugger.
NULL,
KernelMode);
}
+#endif
}
}