On 30.08.2017 19:05, David Hildenbrand wrote: > It is a leftover from the days where we had still the !ccw virtio > machine. As this one is long gone, let's move everything to > s390-virtio-ccw.c. > > Cornelia Huck <coh...@redhat.com> > Signed-off-by: David Hildenbrand <da...@redhat.com> > --- [...] > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > index ffd56af834..41a9e976dc 100644 > --- a/hw/s390x/s390-virtio-ccw.c > +++ b/hw/s390x/s390-virtio-ccw.c [...] > +static int gtod_load(QEMUFile *f, void *opaque, int version_id) > +{ > + uint64_t tod_low; > + uint8_t tod_high; > + int r; > + > + if (qemu_get_byte(f) == S390_TOD_CLOCK_VALUE_MISSING) { > + fprintf(stderr, "WARNING: Guest clock was not migrated. This could " > + "cause the guest to hang.\n"); > + return 0; > + } > + > + tod_high = qemu_get_byte(f); > + tod_low = qemu_get_be64(f); > + > + r = s390_set_clock(&tod_high, &tod_low); > + if (r) { > + fprintf(stderr, "WARNING: Unable to set guest clock value. " > + "s390_get_clock returned error %d. This could cause " > + "the guest to hang.\n", r); > + } > + > + return 0; > +} > + > +
Nit: One empty line should be enough here. Reviewed-by: Thomas Huth <th...@redhat.com>