]> git.proxmox.com Git - mirror_qemu.git/commit
qga: fence guest-set-time if hwclock not available
authorCornelia Huck <cohuck@redhat.com>
Wed, 27 Nov 2019 10:43:25 +0000 (11:43 +0100)
committerCornelia Huck <cohuck@redhat.com>
Sat, 14 Dec 2019 09:25:50 +0000 (10:25 +0100)
commit5c6096e5656d34f5414834e2e2104646294976fe
treea2074ffa2e47a353f385d079bf5c343ab7dea64e
parentbcf88d56efec4ffc153bbe98d11b689a5ebe1a91
qga: fence guest-set-time if hwclock not available

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.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Message-Id: <20191205115350.18713-1-cohuck@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
qga/commands-posix.c