summaryrefslogtreecommitdiff
path: root/src/test/test-boot-timestamps.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-02-13 14:27:24 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-02-13 22:00:33 +0100
commit0da4cc97b446b43802692f2415e5a774771b0ca9 (patch)
treee726ae34f04f681495fbb0bad2eeab0fe499c9c8 /src/test/test-boot-timestamps.c
parentec96dad2f456c5dc062bb402483722385b01d63d (diff)
downloadsystemd-0da4cc97b446b43802692f2415e5a774771b0ca9.tar.gz
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.
Diffstat (limited to 'src/test/test-boot-timestamps.c')
-rw-r--r--src/test/test-boot-timestamps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-boot-timestamps.c b/src/test/test-boot-timestamps.c
index 53e378eaab..c3e4876966 100644
--- a/src/test/test-boot-timestamps.c
+++ b/src/test/test-boot-timestamps.c
@@ -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;