mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
test-boot-timestamp: Handle ERANGE error
Timestampfs from sysfs files can be zero in which case ERANGE will be returned so let's make sure we catch that.
This commit is contained in:
parent
ec96dad2f4
commit
0da4cc97b4
@ -16,7 +16,7 @@ static int test_acpi_fpdt(void) {
|
||||
|
||||
r = acpi_get_boot_usec(&loader_start, &loader_exit);
|
||||
if (r < 0) {
|
||||
bool ok = IN_SET(r, -ENOENT, -ENODATA) || ERRNO_IS_PRIVILEGE(r);
|
||||
bool ok = IN_SET(r, -ENOENT, -ENODATA, -ERANGE) || ERRNO_IS_PRIVILEGE(r);
|
||||
|
||||
log_full_errno(ok ? LOG_DEBUG : LOG_ERR, r, "Failed to read ACPI FPDT: %m");
|
||||
return ok ? 0 : r;
|
||||
|
Loading…
Reference in New Issue
Block a user