DM: vrtc code cleanup

- Move the variable local_time from main.c to rtc.c
- Change vrtc_init to return int instead of pointer to vrtc. We do
  track vrtc in struct vmctx.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yin Fengwei
2018-04-20 17:54:07 +08:00
committed by Jack Ren
parent ccc67ceae4
commit 4fcdebc434
4 changed files with 17 additions and 14 deletions

View File

@@ -36,7 +36,8 @@
struct vrtc;
struct vmctx;
struct vrtc *vrtc_init(struct vmctx *ctx, int local_time);
int vrtc_init(struct vmctx *ctx);
void vrtc_enable_localtime(int l_time);
void vrtc_deinit(struct vmctx *ctx);
void vrtc_reset(struct vrtc *vrtc);
time_t vrtc_get_time(struct vrtc *vrtc);