Re: [Qemu-devel] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for <clock offset='variable' basis='utc'/>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 23, 2014 at 11:36:56PM +0200, Paolo Bonzini wrote:
> You can get the current time via the qom-get command, and then
> follow the same algorithm as QEMU:
> 
>     time_t seconds;
> 
>     if (rtc_date_offset == -1) {
>         if (rtc_utc) {
>             seconds = mktimegm(tm);
>         } else {
>             struct tm tmp = *tm;
>             tmp.tm_isdst = -1; /* use timezone to figure it out */
>             seconds = mktime(&tmp);
>         }
>     } else {
>         seconds = mktimegm(tm) + rtc_date_offset;
>     }
>     return seconds - time(NULL);
> 
> Unfortunately the QOM path to the RTC device is not stable.  We can
> add a /machine/rtc link, and if the PPC guys implement the link and
> current-time property as well, the same mechanism can work for any
> board.
> 
> Paolo

I like that idea. Questions:

- What guarantees are there that the interface is stable?
(you can argue that "now it is").

- Perhaps add /machine/stable/ path to contain stable
links ?

- How do i go about adding a link to a device again?

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]