On Thu, Nov 28, 2019 at 07:11:00PM +0100, Cornelia Huck wrote: > The Posix implementation of guest-set-time invokes hwclock to > set/retrieve the time to/from the hardware clock. If hwclock > is not available, the user is currently informed that "hwclock > failed to set hardware clock to system time", which is quite > misleading. This may happen e.g. on s390x, which has a different > timekeeping concept anyway. > > Let's check for the availability of the hwclock command and > return QERR_UNSUPPORTED for guest-set-time if it is not available. > > Signed-off-by: Cornelia Huck <coh...@redhat.com> > --- > > v1 (RFC) -> v2: > - use hwclock_path[] > - use access() instead of stat() > > --- > qga/commands-posix.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> 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 :|