mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-28 12:31:04 +00:00
Merge pull request #35 from rbradford/rtc-valid-tweak
qemu: Do not try and generate invalid RTC parameters
This commit is contained in:
commit
f3ab90f21b
12
qemu/qemu.go
12
qemu/qemu.go
@ -1064,16 +1064,12 @@ type RTC struct {
|
|||||||
|
|
||||||
// Valid returns true if the RTC structure is valid and complete.
|
// Valid returns true if the RTC structure is valid and complete.
|
||||||
func (rtc RTC) Valid() bool {
|
func (rtc RTC) Valid() bool {
|
||||||
if rtc.Clock != "" {
|
if rtc.Clock != Host && rtc.Clock != VM {
|
||||||
if rtc.Clock != Host && rtc.Clock != VM {
|
return false
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if rtc.DriftFix != "" {
|
if rtc.DriftFix != Slew && rtc.DriftFix != NoDriftFix {
|
||||||
if rtc.DriftFix != Slew && rtc.DriftFix != NoDriftFix {
|
return false
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user