mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-11-04 11:50:15 +00:00 
			
		
		
		
	Add rt clock definition for rtc clock in qemu
There are three different types for the RTC clock: host, rt and vm. Add `rt` to the list of RTC clocks. Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
This commit is contained in:
		@@ -1876,6 +1876,9 @@ const (
 | 
				
			|||||||
	// Host is for using the host clock as a reference.
 | 
						// Host is for using the host clock as a reference.
 | 
				
			||||||
	Host RTCClock = "host"
 | 
						Host RTCClock = "host"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// RT is for using the host monotonic clock as a reference.
 | 
				
			||||||
 | 
						RT RTCClock = "rt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// VM is for using the guest clock as a reference
 | 
						// VM is for using the guest clock as a reference
 | 
				
			||||||
	VM RTCClock = "vm"
 | 
						VM RTCClock = "vm"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -1902,7 +1905,7 @@ 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 != Host && rtc.Clock != VM {
 | 
						if rtc.Clock != Host && rtc.Clock != RT && rtc.Clock != VM {
 | 
				
			||||||
		return false
 | 
							return false
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user