diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-12-06 11:55:20 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-12-15 21:06:42 +0100 |
commit | a97abb30e7ebaf5cfa07e3815909d7c0c4416e6c (patch) | |
tree | 4e366a181f471183cba0e27edae0d707d2246a4b /src/shared/efi-loader.c | |
parent | shared/loop-util: spin on LOOP_CTL_REMOVE (diff) | |
download | systemd-a97abb30e7ebaf5cfa07e3815909d7c0c4416e6c.tar.xz systemd-a97abb30e7ebaf5cfa07e3815909d7c0c4416e6c.zip |
shared/efi-loader: add some debugging statements
Should make it easier to figure out why some operations fail...
Diffstat (limited to '')
-rw-r--r-- | src/shared/efi-loader.c | 11 |
1 files changed, 7 insertions, 4 deletions
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; |