From: Mike Yuan Date: Mon, 29 Apr 2024 07:45:14 +0000 (+0800) Subject: efivars: drop unneeded UTIME_NOW X-Git-Tag: v256-rc2~163^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cce82462a19d59c1e1bb2eafa9dc879a1c95cf40;p=thirdparty%2Fsystemd.git efivars: drop unneeded UTIME_NOW futimens(2) defaults to current time if 'times' is NULL. --- diff --git a/src/basic/efivars.c b/src/basic/efivars.c index 43f498de0ff..8470d085c77 100644 --- a/src/basic/efivars.c +++ b/src/basic/efivars.c @@ -239,10 +239,7 @@ int efi_set_variable(const char *variable, const void *value, size_t size) { /* For some reason efivarfs doesn't update mtime automatically. Let's do it manually then. This is * useful for processes that cache EFI variables to detect when changes occurred. */ - if (futimens(fd, (const struct timespec[2]) { - { .tv_nsec = UTIME_NOW }, - { .tv_nsec = UTIME_NOW } - }) < 0) + if (futimens(fd, /* times = */ NULL) < 0) log_debug_errno(errno, "Failed to update mtime/atime on %s, ignoring: %m", p); r = 0;