Date: Fri, 15 Jun 2018 19:07:06 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335228 - head/stand/efi/loader Message-ID: <201806151907.w5FJ76w1096080@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri Jun 15 19:07:06 2018 New Revision: 335228 URL: https://svnweb.freebsd.org/changeset/base/335228 Log: Migrate has_keyboard to bool. Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Fri Jun 15 19:02:53 2018 (r335227) +++ head/stand/efi/loader/main.c Fri Jun 15 19:07:06 2018 (r335228) @@ -92,14 +92,14 @@ efi_zfs_is_preferred(EFI_HANDLE *h) } #endif -static int +static bool has_keyboard(void) { EFI_STATUS status; EFI_DEVICE_PATH *path; EFI_HANDLE *hin, *hin_end, *walker; UINTN sz; - int retval = 0; + bool retval = false; /* * Find all the handles that support the SIMPLE_TEXT_INPUT_PROTOCOL and @@ -146,7 +146,7 @@ has_keyboard(void) acpi = (ACPI_HID_DEVICE_PATH *)(void *)path; if ((EISA_ID_TO_NUM(acpi->HID) & 0xff00) == 0x300 && (acpi->HID & 0xffff) == PNP_EISA_ID_CONST) { - retval = 1; + retval = true; goto out; } /* @@ -162,7 +162,7 @@ has_keyboard(void) if (usb->DeviceClass == 3 && /* HID */ usb->DeviceSubClass == 1 && /* Boot devices */ usb->DeviceProtocol == 1) { /* Boot keyboards */ - retval = 1; + retval = true; goto out; } } @@ -416,7 +416,7 @@ main(int argc, CHAR16 *argv[]) int i, j, howto; bool vargood; UINTN k; - int has_kbd; + bool has_kbd; char *s; EFI_DEVICE_PATH *imgpath; CHAR16 *text;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806151907.w5FJ76w1096080>