diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-07-14 16:14:08 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-14 16:14:08 +0900 |
commit | e18f21e34924d02dd7c330a644149d89fcc38042 (patch) | |
tree | 28782cf9a88b12e13f57e10069a795c4b6998865 /src/basic/efivars.c | |
parent | 54d1fdb244ba137dbb0bd97836bb63fd215e6bf1 (diff) | |
parent | ae732f6e2d66e8ee5c5dfcdcb17b1b9d7e04c124 (diff) | |
download | systemd-e18f21e34924d02dd7c330a644149d89fcc38042.tar.gz |
Merge pull request #20109 from keszybz/timestamp-macros
Add macros that define scratch buffer internally for timestamp/timespan formatting
Diffstat (limited to 'src/basic/efivars.c')
-rw-r--r-- | src/basic/efivars.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/basic/efivars.c b/src/basic/efivars.c index 77d969c635..3e5c5e68dd 100644 --- a/src/basic/efivars.c +++ b/src/basic/efivars.c @@ -120,13 +120,10 @@ int efi_get_variable( n = st.st_size - 4; if (DEBUG_LOGGING) { - char ts[FORMAT_TIMESPAN_MAX]; - usec_t end; - - end = now(CLOCK_MONOTONIC); + usec_t end = now(CLOCK_MONOTONIC); if (end > begin + EFI_RETRY_DELAY) log_debug("Detected slow EFI variable read access on %s: %s", - variable, format_timespan(ts, sizeof(ts), end - begin, 1)); + variable, FORMAT_TIMESPAN(end - begin, 1)); } /* Note that efivarfs interestingly doesn't require ftruncate() to update an existing EFI variable |