From a97abb30e7ebaf5cfa07e3815909d7c0c4416e6c Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 6 Dec 2019 11:55:20 +0100 Subject: shared/efi-loader: add some debugging statements Should make it easier to figure out why some operations fail... --- src/shared/efi-loader.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/shared/efi-loader.c') diff --git a/src/shared/efi-loader.c b/src/shared/efi-loader.c index 3d1df09907..108f31d502 100644 --- a/src/shared/efi-loader.c +++ b/src/shared/efi-loader.c @@ -562,17 +562,20 @@ int efi_loader_get_boot_usec(usec_t *firmware, usec_t *loader) { r = read_usec(EFI_VENDOR_LOADER, "LoaderTimeInitUSec", &x); if (r < 0) - return r; + return log_debug_errno(r, "Failed to read LoaderTimeInitUSec: %m"); r = read_usec(EFI_VENDOR_LOADER, "LoaderTimeExecUSec", &y); if (r < 0) - return r; + return log_debug_errno(r, "Failed to read LoaderTimeExecUSec: %m"); if (y == 0 || y < x) - return -EIO; + return log_debug_errno(SYNTHETIC_ERRNO(EIO), + "Bad LoaderTimeInitUSec=%"PRIu64", LoaderTimeExecUSec=%" PRIu64"; refusing.", + x, y); if (y > USEC_PER_HOUR) - return -EIO; + return log_debug_errno(SYNTHETIC_ERRNO(EIO), + "LoaderTimeExecUSec=%"PRIu64" too large, refusing.", x); *firmware = x; *loader = y; -- cgit v1.2.3