Il 23/07/2012 07:12, Juan Quintela ha scritto: > .fields = (VMStateField []) { > VMSTATE_BUFFER(cmos_data, RTCState), > VMSTATE_UINT8(cmos_index, RTCState), > VMSTATE_INT32(current_tm.tm_sec, RTCState), > VMSTATE_INT32(current_tm.tm_min, RTCState), > VMSTATE_INT32(current_tm.tm_hour, RTCState), > VMSTATE_INT32(current_tm.tm_wday, RTCState), > VMSTATE_INT32(current_tm.tm_mday, RTCState), > VMSTATE_INT32(current_tm.tm_mon, RTCState), > VMSTATE_INT32(current_tm.tm_year, RTCState), > > you can change this to: > > VMSTATE_UNUSED(7*4);
I think this is not safe. In the load_old case, we ignore the struct tm because we call rtc_set_time and check_update_timer. We need this to make up some values of base_rtc, last_update and offset. In the normal case we need both the CMOS data and the timer data. Though perhaps I can make a further change and remove current_tm altogether. I'll take a look this week; however that will make it even harder to produce the old version. Paolo