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

[Xen-changelog] [xen-unstable] [qemu] Remove unused -timeoffset option.



# HG changeset patch
# User Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
# Date 1178807968 -3600
# Node ID a4467c0971ba0e876637478b7f5e37ce344768c0
# Parent  a6308744caae3e70fa7225a940f1593de3f41cc7
[qemu] Remove unused -timeoffset option.

Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxxx>
---
 tools/ioemu/hw/mc146818rtc.c |   27 +--------------------------
 tools/ioemu/hw/pc.c          |   16 +++++++---------
 tools/ioemu/vl.c             |   11 +----------
 tools/ioemu/vl.h             |    2 +-
 4 files changed, 10 insertions(+), 46 deletions(-)

diff -r a6308744caae -r a4467c0971ba tools/ioemu/hw/mc146818rtc.c
--- a/tools/ioemu/hw/mc146818rtc.c      Thu May 10 15:17:20 2007 +0100
+++ b/tools/ioemu/hw/mc146818rtc.c      Thu May 10 15:39:28 2007 +0100
@@ -178,27 +178,10 @@ static inline int from_bcd(RTCState *s, 
     }
 }
 
-static void send_timeoffset_msg(time_t delta)
-{
-
-/* This routine is used to inform another entity that the
-   base time offset has changed. For instance, if you
-   were using xenstore, you might want to write to the store
-   at this point.  Or, you might use some other method.
-   Whatever you might choose, here's a hook point to implement it.
-
-   One item of note is that this delta is in addition to
-   any existing offset you might be already using. */
-
-    return;
-}
-
 static void rtc_set_time(RTCState *s)
 {
     struct tm *tm = &s->current_tm;
-    time_t before, after;
-    
-    before = mktime(tm);
+
     tm->tm_sec = from_bcd(s, s->cmos_data[RTC_SECONDS]);
     tm->tm_min = from_bcd(s, s->cmos_data[RTC_MINUTES]);
     tm->tm_hour = from_bcd(s, s->cmos_data[RTC_HOURS] & 0x7f);
@@ -210,12 +193,6 @@ static void rtc_set_time(RTCState *s)
     tm->tm_mday = from_bcd(s, s->cmos_data[RTC_DAY_OF_MONTH]);
     tm->tm_mon = from_bcd(s, s->cmos_data[RTC_MONTH]) - 1;
     tm->tm_year = from_bcd(s, s->cmos_data[RTC_YEAR]) + 100;
-
-    /* Compute, and send, the additional time delta
-       We could compute the total time delta, but this is
-       sufficient, and simple. */
-    after = mktime(tm);
-    send_timeoffset_msg(after-before);
 }
 
 static void rtc_copy_date(RTCState *s)
@@ -412,11 +389,9 @@ void rtc_set_date_from_host(RTCState *s)
     time_t ti;
     struct tm *tm;
     int val;
-    extern time_t timeoffset;
 
     /* set the CMOS date */
     time(&ti);
-    ti += timeoffset;
     if (rtc_utc)
         tm = gmtime(&ti);
     else
diff -r a6308744caae -r a4467c0971ba tools/ioemu/hw/pc.c
--- a/tools/ioemu/hw/pc.c       Thu May 10 15:17:20 2007 +0100
+++ b/tools/ioemu/hw/pc.c       Thu May 10 15:39:28 2007 +0100
@@ -177,7 +177,7 @@ static int get_bios_disk(char *boot_devi
 }
 
 /* hd_table must contain 4 block drivers */
-static void cmos_init(uint64_t ram_size, char *boot_device, BlockDriverState 
**hd_table, time_t timeoffset)
+static void cmos_init(uint64_t ram_size, char *boot_device, BlockDriverState 
**hd_table)
 {
     RTCState *s = rtc_state;
     int val;
@@ -464,7 +464,7 @@ static void pc_init1(uint64_t ram_size, 
 static void pc_init1(uint64_t ram_size, int vga_ram_size, char *boot_device,
                      DisplayState *ds, const char **fd_filename, int snapshot,
                      const char *kernel_filename, const char *kernel_cmdline,
-                     const char *initrd_filename, time_t timeoffset,
+                     const char *initrd_filename,
                      int pci_enabled)
 {
 #ifndef NOBIOS
@@ -741,7 +741,7 @@ static void pc_init1(uint64_t ram_size, 
 
     floppy_controller = fdctrl_init(6, 2, 0, 0x3f0, fd_table);
 
-    cmos_init(ram_size, boot_device, bs_table, timeoffset);
+    cmos_init(ram_size, boot_device, bs_table);
 
     /* using PIIX4 acpi model */
     if (pci_enabled && acpi_enabled)
@@ -801,13 +801,12 @@ static void pc_init_pci(uint64_t ram_siz
                         int snapshot, 
                         const char *kernel_filename, 
                         const char *kernel_cmdline,
-                        const char *initrd_filename,
-                        time_t timeoffset)
+                        const char *initrd_filename)
 {
     pc_init1(ram_size, vga_ram_size, boot_device,
              ds, fd_filename, snapshot,
              kernel_filename, kernel_cmdline,
-             initrd_filename, timeoffset, 1);
+             initrd_filename, 1);
 }
 
 static void pc_init_isa(uint64_t ram_size, int vga_ram_size, char *boot_device,
@@ -815,13 +814,12 @@ static void pc_init_isa(uint64_t ram_siz
                         int snapshot, 
                         const char *kernel_filename, 
                         const char *kernel_cmdline,
-                        const char *initrd_filename,
-                        time_t timeoffset)
+                        const char *initrd_filename)
 {
     pc_init1(ram_size, vga_ram_size, boot_device,
              ds, fd_filename, snapshot,
              kernel_filename, kernel_cmdline,
-             initrd_filename, timeoffset, 0);
+             initrd_filename, 0);
 }
 
 QEMUMachine pc_machine = {
diff -r a6308744caae -r a4467c0971ba tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Thu May 10 15:17:20 2007 +0100
+++ b/tools/ioemu/vl.c  Thu May 10 15:39:28 2007 +0100
@@ -182,8 +182,6 @@ extern int vcpus;
 extern int vcpus;
 
 int xc_handle;
-
-time_t timeoffset = 0;
 
 char domain_name[1024] = { 'H','V', 'M', 'X', 'E', 'N', '-'};
 extern int domid;
@@ -6326,7 +6324,6 @@ void help(void)
           "-vnc display    start a VNC server on display\n"
            "-vncviewer      start a vncviewer process for this domain\n"
            "-vncunused      bind the VNC server to an unused port\n"
-           "-timeoffset     time offset (in seconds) from local time\n"
 #ifndef _WIN32
           "-daemonize      daemonize QEMU after initializing\n"
 #endif
@@ -6423,7 +6420,6 @@ enum {
     ,
     QEMU_OPTION_d,
     QEMU_OPTION_vcpus,
-    QEMU_OPTION_timeoffset,
     QEMU_OPTION_acpi,
     QEMU_OPTION_vncviewer,
     QEMU_OPTION_vncunused,
@@ -6523,7 +6519,6 @@ const QEMUOption qemu_options[] = {
     
     { "d", HAS_ARG, QEMU_OPTION_d },
     { "vcpus", 1, QEMU_OPTION_vcpus },
-    { "timeoffset", HAS_ARG, QEMU_OPTION_timeoffset },
     { "acpi", 0, QEMU_OPTION_acpi },
     { NULL },
 };
@@ -7468,9 +7463,6 @@ int main(int argc, char **argv)
                 vcpus = atoi(optarg);
                 fprintf(logfile, "qemu: the number of cpus is %d\n", vcpus);
                 break;
-            case QEMU_OPTION_timeoffset:
-                timeoffset = strtol(optarg, NULL, 0);
-                break;
             case QEMU_OPTION_acpi:
                 acpi_enabled = 1;
                 break;
@@ -7842,8 +7834,7 @@ int main(int argc, char **argv)
 
     machine->init(ram_size, vga_ram_size, boot_device,
                   ds, fd_filename, snapshot,
-                  kernel_filename, kernel_cmdline, initrd_filename,
-                  timeoffset);
+                  kernel_filename, kernel_cmdline, initrd_filename);
     free(boot_device);
 
     /* init USB devices */
diff -r a6308744caae -r a4467c0971ba tools/ioemu/vl.h
--- a/tools/ioemu/vl.h  Thu May 10 15:17:20 2007 +0100
+++ b/tools/ioemu/vl.h  Thu May 10 15:39:28 2007 +0100
@@ -728,7 +728,7 @@ typedef void QEMUMachineInitFunc(uint64_
                                  char *boot_device,
              DisplayState *ds, const char **fd_filename, int snapshot,
              const char *kernel_filename, const char *kernel_cmdline,
-             const char *initrd_filename, time_t timeoffset);
+             const char *initrd_filename);
 
 typedef struct QEMUMachine {
     const char *name;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.