Changeset View
Changeset View
Standalone View
Standalone View
sys/boot/efi/loader/main.c
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
has_keyboard(void) | has_keyboard(void) | ||||
{ | { | ||||
EFI_STATUS status; | EFI_STATUS status; | ||||
EFI_DEVICE_PATH *path; | EFI_DEVICE_PATH *path; | ||||
EFI_HANDLE *hin, *hin_end, *walker; | EFI_HANDLE *hin, *hin_end, *walker; | ||||
UINTN sz; | UINTN sz; | ||||
int retval = 0; | int retval = 0; | ||||
trasz: Commit those two files (whitespace changes) separately perhaps? Similar thing for a few other… | |||||
eric_metricspace.netAuthorUnsubmitted Not Done Inline ActionsThese are artifacts of my emacs setup. They can be dropped from the final commit. eric_metricspace.net: These are artifacts of my emacs setup. They can be dropped from the final commit. | |||||
/* | /* | ||||
* Find all the handles that support the SIMPLE_TEXT_INPUT_PROTOCOL and | * Find all the handles that support the SIMPLE_TEXT_INPUT_PROTOCOL and | ||||
* do the typical dance to get the right sized buffer. | * do the typical dance to get the right sized buffer. | ||||
*/ | */ | ||||
sz = 0; | sz = 0; | ||||
hin = NULL; | hin = NULL; | ||||
status = BS->LocateHandle(ByProtocol, &inputid, 0, &sz, 0); | status = BS->LocateHandle(ByProtocol, &inputid, 0, &sz, 0); | ||||
if (status == EFI_BUFFER_TOO_SMALL) { | if (status == EFI_BUFFER_TOO_SMALL) { | ||||
Show All 40 Lines | while (!IsDevicePathEnd(path)) { | ||||
/* | /* | ||||
* Check for USB keyboard node, if present. Unlike a | * Check for USB keyboard node, if present. Unlike a | ||||
* PS/2 keyboard, these definitely only appear when | * PS/2 keyboard, these definitely only appear when | ||||
* connected to the system. | * connected to the system. | ||||
*/ | */ | ||||
} else if (DevicePathType(path) == MESSAGING_DEVICE_PATH && | } else if (DevicePathType(path) == MESSAGING_DEVICE_PATH && | ||||
DevicePathSubType(path) == MSG_USB_CLASS_DP) { | DevicePathSubType(path) == MSG_USB_CLASS_DP) { | ||||
USB_CLASS_DEVICE_PATH *usb; | USB_CLASS_DEVICE_PATH *usb; | ||||
usb = (USB_CLASS_DEVICE_PATH *)(void *)path; | usb = (USB_CLASS_DEVICE_PATH *)(void *)path; | ||||
if (usb->DeviceClass == 3 && /* HID */ | if (usb->DeviceClass == 3 && /* HID */ | ||||
usb->DeviceSubClass == 1 && /* Boot devices */ | usb->DeviceSubClass == 1 && /* Boot devices */ | ||||
usb->DeviceProtocol == 1) { /* Boot keyboards */ | usb->DeviceProtocol == 1) { /* Boot keyboards */ | ||||
retval = 1; | retval = 1; | ||||
goto out; | goto out; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 690 Lines • Show Last 20 Lines |
Commit those two files (whitespace changes) separately perhaps? Similar thing for a few other style fixes above.