]> Savannah Git Hosting - gnulib.git/commit
readutmp: Fix boot time in VMs after sleep state and date update.
authorBruno Haible <bruno@clisp.org>
Wed, 9 Aug 2023 19:12:40 +0000 (21:12 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 9 Aug 2023 19:12:40 +0000 (21:12 +0200)
commit321daa595e02717c7dca111184fc091fda3862f8
tree32edc69a552d837306a1d28b3bdcb629d15ec1e3
parent1e4bc08eb8ce3c00f7b8e72dc69e07ccbc63ed20
readutmp: Fix boot time in VMs after sleep state and date update.

* lib/readutmp.c (read_utmp_from_file): New function, extracted from
read_utmp.
(get_boot_time_uncached): Before all other approaches, try to find the
boot time in the /var/run/utmp file.
(read_utmp): Invoke read_utmp_from_file.
ChangeLog
lib/readutmp.c