
On Thu, Jul 25, 2019 at 02:22:04PM -0400, Stefan Berger wrote:
Check whether previously found executables were updated and if so look for them again. This helps to use updated features of swtpm and its tools upon updating them.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> --- src/qemu/qemu_tpm.c | 1 + src/util/virtpm.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+)
+ if (!findit && + memcmp(&statbuf.st_mtim, + &prgs[i].stat->st_mtime,
You're comparing st_mtim against st_mtime, but luckily that works due to the back magic for defining this struct. More seriously though st_mtim is non-portable so this broke the Windows build. I've just changed it to st_mtime and done a plain integer comparison instead of memcmp. There's no compelling reason for this to use nanosecond precision
+ sizeof(statbuf.st_mtim))) { + findit = true; + } + }
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|