Merge pull request #35 from rbradford/rtc-valid-tweak

qemu: Do not try and generate invalid RTC parameters
This commit is contained in:
Mark Ryan 2018-08-10 15:11:15 +01:00 committed by GitHub
commit f3ab90f21b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1064,16 +1064,12 @@ type RTC struct {
// Valid returns true if the RTC structure is valid and complete.
func (rtc RTC) Valid() bool {
if rtc.Clock != "" {
if rtc.Clock != Host && rtc.Clock != VM {
return false
}
if rtc.Clock != Host && rtc.Clock != VM {
return false
}
if rtc.DriftFix != "" {
if rtc.DriftFix != Slew && rtc.DriftFix != NoDriftFix {
return false
}
if rtc.DriftFix != Slew && rtc.DriftFix != NoDriftFix {
return false
}
return true