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

[Xen-devel] [PATCH 3/5] [ioemu]: qemu_{put,get} pointer signedness



emu_put* and qemu_get* use a unsigned pointer to the variables, some of them are declared signed, so this provokes a warning. Switching to call by value version of qemu_put, so the compiler handles this correctly.

--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 277-84917
----to satisfy European Law for business letters:
AMD Saxony Limited Liability Company & Co. KG,
Wilschdorfer Landstr. 101, 01109 Dresden, Germany
Register Court Dresden: HRA 4896, General Partner authorized
to represent: AMD Saxony LLC (Wilmington, Delaware, US)
General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
diff -r 0f0d67f29ccb tools/ioemu/hw/acpi.c
--- a/tools/ioemu/hw/acpi.c     Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/acpi.c     Tue Jan 08 14:48:38 2008 +0100
@@ -441,7 +441,7 @@ static void pm_save(QEMUFile* f,void *op
     qemu_put_8s(f, &s->apmc);
     qemu_put_8s(f, &s->apms);
     qemu_put_timer(f, s->tmr_timer);
-    qemu_put_be64s(f, &s->tmr_overflow_time);
+    qemu_put_be64(f, s->tmr_overflow_time);
 }
 
 static int pm_load(QEMUFile* f,void* opaque,int version_id)
@@ -462,7 +462,7 @@ static int pm_load(QEMUFile* f,void* opa
     qemu_get_8s(f, &s->apmc);
     qemu_get_8s(f, &s->apms);
     qemu_get_timer(f, s->tmr_timer);
-    qemu_get_be64s(f, &s->tmr_overflow_time);
+    s->tmr_overflow_time=qemu_get_be64(f);
 
     pm_io_space_update(s);
 
diff -r 0f0d67f29ccb tools/ioemu/hw/apic.c
--- a/tools/ioemu/hw/apic.c     Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/apic.c     Tue Jan 08 14:48:38 2008 +0100
@@ -740,10 +740,10 @@ static void apic_save(QEMUFile *f, void 
     qemu_put_be32s(f, &s->icr[0]);
     qemu_put_be32s(f, &s->icr[1]);
     qemu_put_be32s(f, &s->divide_conf);
-    qemu_put_be32s(f, &s->count_shift);
+    qemu_put_be32(f, s->count_shift);
     qemu_put_be32s(f, &s->initial_count);
-    qemu_put_be64s(f, &s->initial_count_load_time);
-    qemu_put_be64s(f, &s->next_time);
+    qemu_put_be64(f, s->initial_count_load_time);
+    qemu_put_be64(f, s->next_time);
 
     qemu_put_timer(f, s->timer);
 }
@@ -776,10 +776,10 @@ static int apic_load(QEMUFile *f, void *
     qemu_get_be32s(f, &s->icr[0]);
     qemu_get_be32s(f, &s->icr[1]);
     qemu_get_be32s(f, &s->divide_conf);
-    qemu_get_be32s(f, &s->count_shift);
+    s->count_shift=qemu_get_be32(f);
     qemu_get_be32s(f, &s->initial_count);
-    qemu_get_be64s(f, &s->initial_count_load_time);
-    qemu_get_be64s(f, &s->next_time);
+    s->initial_count_load_time=qemu_get_be64(f);
+    s->next_time=qemu_get_be64(f);
 
     if (version_id >= 2)
         qemu_get_timer(f, s->timer);
diff -r 0f0d67f29ccb tools/ioemu/hw/cirrus_vga.c
--- a/tools/ioemu/hw/cirrus_vga.c       Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/cirrus_vga.c       Tue Jan 08 14:48:38 2008 +0100
@@ -3089,7 +3089,7 @@ static void cirrus_vga_save(QEMUFile *f,
     qemu_put_buffer(f, s->gr + 2, 254);
     qemu_put_8s(f, &s->ar_index);
     qemu_put_buffer(f, s->ar, 21);
-    qemu_put_be32s(f, &s->ar_flip_flop);
+    qemu_put_be32(f, s->ar_flip_flop);
     qemu_put_8s(f, &s->cr_index);
     qemu_put_buffer(f, s->cr, 256);
     qemu_put_8s(f, &s->msr);
@@ -3104,7 +3104,7 @@ static void cirrus_vga_save(QEMUFile *f,
     qemu_put_buffer(f, s->dac_cache, 3);
     qemu_put_buffer(f, s->palette, 768);
 
-    qemu_put_be32s(f, &s->bank_offset);
+    qemu_put_be32(f, s->bank_offset);
 
     qemu_put_8s(f, &s->cirrus_hidden_dac_lockindex);
     qemu_put_8s(f, &s->cirrus_hidden_dac_data);
@@ -3147,7 +3147,7 @@ static int cirrus_vga_load(QEMUFile *f, 
     qemu_get_buffer(f, s->gr + 2, 254);
     qemu_get_8s(f, &s->ar_index);
     qemu_get_buffer(f, s->ar, 21);
-    qemu_get_be32s(f, &s->ar_flip_flop);
+    s->ar_flip_flop=qemu_get_be32(f);
     qemu_get_8s(f, &s->cr_index);
     qemu_get_buffer(f, s->cr, 256);
     qemu_get_8s(f, &s->msr);
@@ -3162,7 +3162,7 @@ static int cirrus_vga_load(QEMUFile *f, 
     qemu_get_buffer(f, s->dac_cache, 3);
     qemu_get_buffer(f, s->palette, 768);
 
-    qemu_get_be32s(f, &s->bank_offset);
+    s->bank_offset=qemu_get_be32(f);
 
     qemu_get_8s(f, &s->cirrus_hidden_dac_lockindex);
     qemu_get_8s(f, &s->cirrus_hidden_dac_data);
diff -r 0f0d67f29ccb tools/ioemu/hw/dma.c
--- a/tools/ioemu/hw/dma.c      Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/dma.c      Tue Jan 08 14:48:38 2008 +0100
@@ -483,12 +483,12 @@ static void dma_save (QEMUFile *f, void 
     qemu_put_8s (f, &d->command);
     qemu_put_8s (f, &d->mask);
     qemu_put_8s (f, &d->flip_flop);
-    qemu_put_be32s (f, &d->dshift);
+    qemu_put_be32 (f, d->dshift);
 
     for (i = 0; i < 4; ++i) {
         struct dma_regs *r = &d->regs[i];
-        qemu_put_be32s (f, &r->now[0]);
-        qemu_put_be32s (f, &r->now[1]);
+        qemu_put_be32 (f, r->now[0]);
+        qemu_put_be32 (f, r->now[1]);
         qemu_put_be16s (f, &r->base[0]);
         qemu_put_be16s (f, &r->base[1]);
         qemu_put_8s (f, &r->mode);
@@ -511,12 +511,12 @@ static int dma_load (QEMUFile *f, void *
     qemu_get_8s (f, &d->command);
     qemu_get_8s (f, &d->mask);
     qemu_get_8s (f, &d->flip_flop);
-    qemu_get_be32s (f, &d->dshift);
+    d->dshift=qemu_get_be32 (f);
 
     for (i = 0; i < 4; ++i) {
         struct dma_regs *r = &d->regs[i];
-        qemu_get_be32s (f, &r->now[0]);
-        qemu_get_be32s (f, &r->now[1]);
+        r->now[0]=qemu_get_be32 (f);
+        r->now[1]=qemu_get_be32 (f);
         qemu_get_be16s (f, &r->base[0]);
         qemu_get_be16s (f, &r->base[1]);
         qemu_get_8s (f, &r->mode);
diff -r 0f0d67f29ccb tools/ioemu/hw/i8254.c
--- a/tools/ioemu/hw/i8254.c    Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/i8254.c    Tue Jan 08 14:48:38 2008 +0100
@@ -394,7 +394,7 @@ static void pit_save(QEMUFile *f, void *
     
     for(i = 0; i < 3; i++) {
         s = &pit->channels[i];
-        qemu_put_be32s(f, &s->count);
+        qemu_put_be32(f, s->count);
         qemu_put_be16s(f, &s->latched_count);
         qemu_put_8s(f, &s->count_latched);
         qemu_put_8s(f, &s->status_latched);
@@ -406,9 +406,9 @@ static void pit_save(QEMUFile *f, void *
         qemu_put_8s(f, &s->mode);
         qemu_put_8s(f, &s->bcd);
         qemu_put_8s(f, &s->gate);
-        qemu_put_be64s(f, &s->count_load_time);
+        qemu_put_be64(f, s->count_load_time);
         if (s->irq_timer) {
-            qemu_put_be64s(f, &s->next_transition_time);
+            qemu_put_be64(f, s->next_transition_time);
             qemu_put_timer(f, s->irq_timer);
         }
     }
@@ -425,7 +425,7 @@ static int pit_load(QEMUFile *f, void *o
 
     for(i = 0; i < 3; i++) {
         s = &pit->channels[i];
-        qemu_get_be32s(f, &s->count);
+        s->count=qemu_get_be32(f);
         qemu_get_be16s(f, &s->latched_count);
         qemu_get_8s(f, &s->count_latched);
         qemu_get_8s(f, &s->status_latched);
@@ -437,9 +437,9 @@ static int pit_load(QEMUFile *f, void *o
         qemu_get_8s(f, &s->mode);
         qemu_get_8s(f, &s->bcd);
         qemu_get_8s(f, &s->gate);
-        qemu_get_be64s(f, &s->count_load_time);
+        s->count_load_time=qemu_get_be64(f);
         if (s->irq_timer) {
-            qemu_get_be64s(f, &s->next_transition_time);
+            s->next_transition_time=qemu_get_be64(f);
             qemu_get_timer(f, s->irq_timer);
         }
     }
diff -r 0f0d67f29ccb tools/ioemu/hw/ide.c
--- a/tools/ioemu/hw/ide.c      Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/ide.c      Tue Jan 08 14:48:38 2008 +0100
@@ -2705,8 +2705,8 @@ static void pci_ide_save(QEMUFile* f, vo
     /* per IDE drive data */
     for(i = 0; i < 4; i++) {
         IDEState *s = &d->ide_if[i];
-        qemu_put_be32s(f, &s->mult_sectors);
-        qemu_put_be32s(f, &s->identify_set);
+        qemu_put_be32(f, s->mult_sectors);
+        qemu_put_be32(f, s->identify_set);
         if (s->identify_set) {
             qemu_put_buffer(f, (const uint8_t *)s->identify_data, 512);
         }
@@ -2762,8 +2762,8 @@ static int pci_ide_load(QEMUFile* f, voi
     /* per IDE drive data */
     for(i = 0; i < 4; i++) {
         IDEState *s = &d->ide_if[i];
-        qemu_get_be32s(f, &s->mult_sectors);
-        qemu_get_be32s(f, &s->identify_set);
+        s->mult_sectors=qemu_get_be32(f);
+        s->identify_set=qemu_get_be32(f);
         if (s->identify_set) {
             qemu_get_buffer(f, (uint8_t *)s->identify_data, 512);
         }
diff -r 0f0d67f29ccb tools/ioemu/hw/mc146818rtc.c
--- a/tools/ioemu/hw/mc146818rtc.c      Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/mc146818rtc.c      Tue Jan 08 14:48:38 2008 +0100
@@ -410,18 +410,18 @@ static void rtc_save(QEMUFile *f, void *
     qemu_put_buffer(f, s->cmos_data, 128);
     qemu_put_8s(f, &s->cmos_index);
     
-    qemu_put_be32s(f, &s->current_tm.tm_sec);
-    qemu_put_be32s(f, &s->current_tm.tm_min);
-    qemu_put_be32s(f, &s->current_tm.tm_hour);
-    qemu_put_be32s(f, &s->current_tm.tm_wday);
-    qemu_put_be32s(f, &s->current_tm.tm_mday);
-    qemu_put_be32s(f, &s->current_tm.tm_mon);
-    qemu_put_be32s(f, &s->current_tm.tm_year);
+    qemu_put_be32(f, s->current_tm.tm_sec);
+    qemu_put_be32(f, s->current_tm.tm_min);
+    qemu_put_be32(f, s->current_tm.tm_hour);
+    qemu_put_be32(f, s->current_tm.tm_wday);
+    qemu_put_be32(f, s->current_tm.tm_mday);
+    qemu_put_be32(f, s->current_tm.tm_mon);
+    qemu_put_be32(f, s->current_tm.tm_year);
 
     qemu_put_timer(f, s->periodic_timer);
-    qemu_put_be64s(f, &s->next_periodic_time);
-
-    qemu_put_be64s(f, &s->next_second_time);
+    qemu_put_be64(f, s->next_periodic_time);
+
+    qemu_put_be64(f, s->next_second_time);
     qemu_put_timer(f, s->second_timer);
     qemu_put_timer(f, s->second_timer2);
 }
@@ -436,18 +436,18 @@ static int rtc_load(QEMUFile *f, void *o
     qemu_get_buffer(f, s->cmos_data, 128);
     qemu_get_8s(f, &s->cmos_index);
 
-    qemu_get_be32s(f, &s->current_tm.tm_sec);
-    qemu_get_be32s(f, &s->current_tm.tm_min);
-    qemu_get_be32s(f, &s->current_tm.tm_hour);
-    qemu_get_be32s(f, &s->current_tm.tm_wday);
-    qemu_get_be32s(f, &s->current_tm.tm_mday);
-    qemu_get_be32s(f, &s->current_tm.tm_mon);
-    qemu_get_be32s(f, &s->current_tm.tm_year);
+    s->current_tm.tm_sec=qemu_get_be32(f);
+    s->current_tm.tm_min=qemu_get_be32(f);
+    s->current_tm.tm_hour=qemu_get_be32(f);
+    s->current_tm.tm_wday=qemu_get_be32(f);
+    s->current_tm.tm_mday=qemu_get_be32(f);
+    s->current_tm.tm_mon=qemu_get_be32(f);
+    s->current_tm.tm_year=qemu_get_be32(f);
 
     qemu_get_timer(f, s->periodic_timer);
-    qemu_get_be64s(f, &s->next_periodic_time);
-
-    qemu_get_be64s(f, &s->next_second_time);
+    s->next_periodic_time=qemu_get_be64(f);
+
+    s->next_second_time=qemu_get_be64(f);
     qemu_get_timer(f, s->second_timer);
     qemu_get_timer(f, s->second_timer2);
     return 0;
diff -r 0f0d67f29ccb tools/ioemu/hw/ne2000.c
--- a/tools/ioemu/hw/ne2000.c   Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/ne2000.c   Tue Jan 08 14:48:38 2008 +0100
@@ -704,7 +704,7 @@ static void ne2000_save(QEMUFile* f,void
        qemu_put_buffer(f, s->phys, 6);
        qemu_put_8s(f, &s->curpag);
        qemu_put_buffer(f, s->mult, 8);
-       qemu_put_be32s(f, &s->irq);
+       qemu_put_be32(f, s->irq);
        qemu_put_buffer(f, s->mem, NE2000_MEM_SIZE);
 }
 
@@ -744,7 +744,7 @@ static int ne2000_load(QEMUFile* f,void*
        qemu_get_buffer(f, s->phys, 6);
        qemu_get_8s(f, &s->curpag);
        qemu_get_buffer(f, s->mult, 8);
-       qemu_get_be32s(f, &s->irq);
+       s->irq=qemu_get_be32(f);
        qemu_get_buffer(f, s->mem, NE2000_MEM_SIZE);
 
        return 0;
diff -r 0f0d67f29ccb tools/ioemu/hw/pcnet.c
--- a/tools/ioemu/hw/pcnet.c    Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/pcnet.c    Tue Jan 08 14:48:38 2008 +0100
@@ -1770,9 +1770,9 @@ static void pcnet_save(QEMUFile *f, void
     if (s->pci_dev)
         pci_device_save(s->pci_dev, f);
 
-    qemu_put_be32s(f, &s->rap);
-    qemu_put_be32s(f, &s->isr);
-    qemu_put_be32s(f, &s->lnkst);
+    qemu_put_be32(f, s->rap);
+    qemu_put_be32(f, s->isr);
+    qemu_put_be32(f, s->lnkst);
     qemu_put_be32s(f, &s->rdra);
     qemu_put_be32s(f, &s->tdra);
     qemu_put_buffer(f, s->prom, 16);
@@ -1781,10 +1781,10 @@ static void pcnet_save(QEMUFile *f, void
     for (i = 0; i < 32; i++)
         qemu_put_be16s(f, &s->bcr[i]);
     qemu_put_be64s(f, &s->timer);
-    qemu_put_be32s(f, &s->xmit_pos);
-    qemu_put_be32s(f, &s->recv_pos);
+    qemu_put_be32(f, s->xmit_pos);
+    qemu_put_be32(f, s->recv_pos);
     qemu_put_buffer(f, s->buffer, 4096);
-    qemu_put_be32s(f, &s->tx_busy);
+    qemu_put_be32(f, s->tx_busy);
     qemu_put_timer(f, s->poll_timer);
 }
 
@@ -1802,9 +1802,9 @@ static int pcnet_load(QEMUFile *f, void 
             return ret;
     }
 
-    qemu_get_be32s(f, &s->rap);
-    qemu_get_be32s(f, &s->isr);
-    qemu_get_be32s(f, &s->lnkst);
+    qemu_get_be32s(f, (uint32_t*)&s->rap);
+    qemu_get_be32s(f, (uint32_t*)&s->isr);
+    qemu_get_be32s(f, (uint32_t*)&s->lnkst);
     qemu_get_be32s(f, &s->rdra);
     qemu_get_be32s(f, &s->tdra);
     qemu_get_buffer(f, s->prom, 16);
@@ -1813,10 +1813,10 @@ static int pcnet_load(QEMUFile *f, void 
     for (i = 0; i < 32; i++)
         qemu_get_be16s(f, &s->bcr[i]);
     qemu_get_be64s(f, &s->timer);
-    qemu_get_be32s(f, &s->xmit_pos);
-    qemu_get_be32s(f, &s->recv_pos);
+    qemu_get_be32s(f, (uint32_t*)&s->xmit_pos);
+    qemu_get_be32s(f, (uint32_t*)&s->recv_pos);
     qemu_get_buffer(f, s->buffer, 4096);
-    qemu_get_be32s(f, &s->tx_busy);
+    qemu_get_be32s(f, (uint32_t*)&s->tx_busy);
     qemu_get_timer(f, s->poll_timer);
 
     return 0;
diff -r 0f0d67f29ccb tools/ioemu/hw/ps2.c
--- a/tools/ioemu/hw/ps2.c      Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/ps2.c      Tue Jan 08 14:48:38 2008 +0100
@@ -463,19 +463,19 @@ static void ps2_reset(void *opaque)
 
 static void ps2_common_save (QEMUFile *f, PS2State *s)
 {
-    qemu_put_be32s (f, &s->write_cmd);
-    qemu_put_be32s (f, &s->queue.rptr);
-    qemu_put_be32s (f, &s->queue.wptr);
-    qemu_put_be32s (f, &s->queue.count);
+    qemu_put_be32 (f, s->write_cmd);
+    qemu_put_be32 (f, s->queue.rptr);
+    qemu_put_be32 (f, s->queue.wptr);
+    qemu_put_be32 (f, s->queue.count);
     qemu_put_buffer (f, s->queue.data, sizeof (s->queue.data));
 }
 
 static void ps2_common_load (QEMUFile *f, PS2State *s)
 {
-    qemu_get_be32s (f, &s->write_cmd);
-    qemu_get_be32s (f, &s->queue.rptr);
-    qemu_get_be32s (f, &s->queue.wptr);
-    qemu_get_be32s (f, &s->queue.count);
+    s->write_cmd=qemu_get_be32 (f);
+    s->queue.rptr=qemu_get_be32 (f);
+    s->queue.wptr=qemu_get_be32 (f);
+    s->queue.count=qemu_get_be32 (f);
     qemu_get_buffer (f, s->queue.data, sizeof (s->queue.data));
 }
 
@@ -484,8 +484,8 @@ static void ps2_kbd_save(QEMUFile* f, vo
     PS2KbdState *s = (PS2KbdState*)opaque;
 
     ps2_common_save (f, &s->common);
-    qemu_put_be32s(f, &s->scan_enabled);
-    qemu_put_be32s(f, &s->translate);
+    qemu_put_be32(f, s->scan_enabled);
+    qemu_put_be32(f, s->translate);
 }
 
 static void ps2_mouse_save(QEMUFile* f, void* opaque)
@@ -499,9 +499,9 @@ static void ps2_mouse_save(QEMUFile* f, 
     qemu_put_8s(f, &s->mouse_wrap);
     qemu_put_8s(f, &s->mouse_type);
     qemu_put_8s(f, &s->mouse_detect_state);
-    qemu_put_be32s(f, &s->mouse_dx);
-    qemu_put_be32s(f, &s->mouse_dy);
-    qemu_put_be32s(f, &s->mouse_dz);
+    qemu_put_be32(f, s->mouse_dx);
+    qemu_put_be32(f, s->mouse_dy);
+    qemu_put_be32(f, s->mouse_dz);
     qemu_put_8s(f, &s->mouse_buttons);
 }
 
@@ -513,8 +513,8 @@ static int ps2_kbd_load(QEMUFile* f, voi
         return -EINVAL;
 
     ps2_common_load (f, &s->common);
-    qemu_get_be32s(f, &s->scan_enabled);
-    qemu_get_be32s(f, &s->translate);
+    s->scan_enabled=qemu_get_be32(f);
+    s->translate=qemu_get_be32(f);
     return 0;
 }
 
@@ -532,9 +532,9 @@ static int ps2_mouse_load(QEMUFile* f, v
     qemu_get_8s(f, &s->mouse_wrap);
     qemu_get_8s(f, &s->mouse_type);
     qemu_get_8s(f, &s->mouse_detect_state);
-    qemu_get_be32s(f, &s->mouse_dx);
-    qemu_get_be32s(f, &s->mouse_dy);
-    qemu_get_be32s(f, &s->mouse_dz);
+    s->mouse_dx=qemu_get_be32(f);
+    s->mouse_dy=qemu_get_be32(f);
+    s->mouse_dz=qemu_get_be32(f);
     qemu_get_8s(f, &s->mouse_buttons);
     return 0;
 }
diff -r 0f0d67f29ccb tools/ioemu/hw/rtl8139.c
--- a/tools/ioemu/hw/rtl8139.c  Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/rtl8139.c  Tue Jan 08 14:48:38 2008 +0100
@@ -3169,9 +3216,9 @@ static void rtl8139_save(QEMUFile* f,voi
     qemu_put_be16s(f, &s->CpCmd);
     qemu_put_8s(f, &s->TxThresh);
 
-    qemu_put_be32s(f, &s->irq);
+    qemu_put_be32(f, s->irq);
     qemu_put_buffer(f, s->macaddr, 6);
-    qemu_put_be32s(f, &s->rtl8139_mmio_io_addr);
+    qemu_put_be32(f, s->rtl8139_mmio_io_addr);
 
     qemu_put_be32s(f, &s->currTxDesc);
     qemu_put_be32s(f, &s->currCPlusRxDesc);
@@ -3183,7 +3230,7 @@ static void rtl8139_save(QEMUFile* f,voi
     {
         qemu_put_be16s(f, &s->eeprom.contents[i]);
     }
-    qemu_put_be32s(f, &s->eeprom.mode);
+    qemu_put_be32(f, s->eeprom.mode);
     qemu_put_be32s(f, &s->eeprom.tick);
     qemu_put_8s(f, &s->eeprom.address);
     qemu_put_be16s(f, &s->eeprom.input);
@@ -3196,7 +3243,7 @@ static void rtl8139_save(QEMUFile* f,voi
 
     qemu_put_be32s(f, &s->TCTR);
     qemu_put_be32s(f, &s->TimerInt);
-    qemu_put_be64s(f, &s->TCTR_base);
+    qemu_put_be64(f, s->TCTR_base);
 
     RTL8139TallyCounters_save(f, &s->tally_counters);
 }
@@ -3263,9 +3311,9 @@ static int rtl8139_load(QEMUFile* f,void
     qemu_get_be16s(f, &s->CpCmd);
     qemu_get_8s(f, &s->TxThresh);
 
-    qemu_get_be32s(f, &s->irq);
+    s->irq=qemu_get_be32(f);
     qemu_get_buffer(f, s->macaddr, 6);
-    qemu_get_be32s(f, &s->rtl8139_mmio_io_addr);
+    s->rtl8139_mmio_io_addr=qemu_get_be32(f);
 
     qemu_get_be32s(f, &s->currTxDesc);
     qemu_get_be32s(f, &s->currCPlusRxDesc);
@@ -3277,7 +3325,7 @@ static int rtl8139_load(QEMUFile* f,void
     {
         qemu_get_be16s(f, &s->eeprom.contents[i]);
     }
-    qemu_get_be32s(f, &s->eeprom.mode);
+    s->eeprom.mode=qemu_get_be32(f);
     qemu_get_be32s(f, &s->eeprom.tick);
     qemu_get_8s(f, &s->eeprom.address);
     qemu_get_be16s(f, &s->eeprom.input);
@@ -3293,7 +3341,7 @@ static int rtl8139_load(QEMUFile* f,void
     {
         qemu_get_be32s(f, &s->TCTR);
         qemu_get_be32s(f, &s->TimerInt);
-        qemu_get_be64s(f, &s->TCTR_base);
+        s->TCTR_base=qemu_get_be64(f);
 
         RTL8139TallyCounters_load(f, &s->tally_counters);
     }
diff -r 0f0d67f29ccb tools/ioemu/hw/sb16.c
--- a/tools/ioemu/hw/sb16.c     Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/sb16.c     Tue Jan 08 14:48:38 2008 +0100
@@ -1254,29 +1254,29 @@ static void SB_save (QEMUFile *f, void *
 {
     SB16State *s = opaque;
 
-    qemu_put_be32s (f, &s->irq);
-    qemu_put_be32s (f, &s->dma);
-    qemu_put_be32s (f, &s->hdma);
-    qemu_put_be32s (f, &s->port);
-    qemu_put_be32s (f, &s->ver);
-    qemu_put_be32s (f, &s->in_index);
-    qemu_put_be32s (f, &s->out_data_len);
-    qemu_put_be32s (f, &s->fmt_stereo);
-    qemu_put_be32s (f, &s->fmt_signed);
-    qemu_put_be32s (f, &s->fmt_bits);
+    qemu_put_be32 (f, s->irq);
+    qemu_put_be32 (f, s->dma);
+    qemu_put_be32 (f, s->hdma);
+    qemu_put_be32 (f, s->port);
+    qemu_put_be32 (f, s->ver);
+    qemu_put_be32 (f, s->in_index);
+    qemu_put_be32 (f, s->out_data_len);
+    qemu_put_be32 (f, s->fmt_stereo);
+    qemu_put_be32 (f, s->fmt_signed);
+    qemu_put_be32 (f, s->fmt_bits);
     qemu_put_be32s (f, &s->fmt);
-    qemu_put_be32s (f, &s->dma_auto);
-    qemu_put_be32s (f, &s->block_size);
-    qemu_put_be32s (f, &s->fifo);
-    qemu_put_be32s (f, &s->freq);
-    qemu_put_be32s (f, &s->time_const);
-    qemu_put_be32s (f, &s->speaker);
-    qemu_put_be32s (f, &s->needed_bytes);
-    qemu_put_be32s (f, &s->cmd);
-    qemu_put_be32s (f, &s->use_hdma);
-    qemu_put_be32s (f, &s->highspeed);
-    qemu_put_be32s (f, &s->can_write);
-    qemu_put_be32s (f, &s->v2x6);
+    qemu_put_be32 (f, s->dma_auto);
+    qemu_put_be32 (f, s->block_size);
+    qemu_put_be32 (f, s->fifo);
+    qemu_put_be32 (f, s->freq);
+    qemu_put_be32 (f, s->time_const);
+    qemu_put_be32 (f, s->speaker);
+    qemu_put_be32 (f, s->needed_bytes);
+    qemu_put_be32 (f, s->cmd);
+    qemu_put_be32 (f, s->use_hdma);
+    qemu_put_be32 (f, s->highspeed);
+    qemu_put_be32 (f, s->can_write);
+    qemu_put_be32 (f, s->v2x6);
 
     qemu_put_8s (f, &s->csp_param);
     qemu_put_8s (f, &s->csp_value);
@@ -1285,21 +1285,21 @@ static void SB_save (QEMUFile *f, void *
     qemu_put_buffer (f, s->csp_regs, 256);
     qemu_put_8s (f, &s->csp_index);
     qemu_put_buffer (f, s->csp_reg83, 4);
-    qemu_put_be32s (f, &s->csp_reg83r);
-    qemu_put_be32s (f, &s->csp_reg83w);
+    qemu_put_be32 (f, s->csp_reg83r);
+    qemu_put_be32 (f, s->csp_reg83w);
 
     qemu_put_buffer (f, s->in2_data, sizeof (s->in2_data));
     qemu_put_buffer (f, s->out_data, sizeof (s->out_data));
     qemu_put_8s (f, &s->test_reg);
     qemu_put_8s (f, &s->last_read_byte);
 
-    qemu_put_be32s (f, &s->nzero);
-    qemu_put_be32s (f, &s->left_till_irq);
-    qemu_put_be32s (f, &s->dma_running);
-    qemu_put_be32s (f, &s->bytes_per_second);
-    qemu_put_be32s (f, &s->align);
-
-    qemu_put_be32s (f, &s->mixer_nreg);
+    qemu_put_be32 (f, s->nzero);
+    qemu_put_be32 (f, s->left_till_irq);
+    qemu_put_be32 (f, s->dma_running);
+    qemu_put_be32 (f, s->bytes_per_second);
+    qemu_put_be32 (f, s->align);
+
+    qemu_put_be32 (f, s->mixer_nreg);
     qemu_put_buffer (f, s->mixer_regs, 256);
 }
 
@@ -1311,29 +1311,29 @@ static int SB_load (QEMUFile *f, void *o
         return -EINVAL;
     }
 
-    qemu_get_be32s (f, &s->irq);
-    qemu_get_be32s (f, &s->dma);
-    qemu_get_be32s (f, &s->hdma);
-    qemu_get_be32s (f, &s->port);
-    qemu_get_be32s (f, &s->ver);
-    qemu_get_be32s (f, &s->in_index);
-    qemu_get_be32s (f, &s->out_data_len);
-    qemu_get_be32s (f, &s->fmt_stereo);
-    qemu_get_be32s (f, &s->fmt_signed);
-    qemu_get_be32s (f, &s->fmt_bits);
+    s->irq=qemu_get_be32 (f);
+    s->dma=qemu_get_be32 (f);
+    s->hdma=qemu_get_be32 (f);
+    s->port=qemu_get_be32 (f);
+    s->ver=qemu_get_be32 (f);
+    s->in_index=qemu_get_be32 (f);
+    s->out_data_len=qemu_get_be32 (f);
+    s->fmt_stereo=qemu_get_be32 (f);
+    s->fmt_signed=qemu_get_be32 (f);
+    s->fmt_bits=qemu_get_be32 (f);
     qemu_get_be32s (f, &s->fmt);
-    qemu_get_be32s (f, &s->dma_auto);
-    qemu_get_be32s (f, &s->block_size);
-    qemu_get_be32s (f, &s->fifo);
-    qemu_get_be32s (f, &s->freq);
-    qemu_get_be32s (f, &s->time_const);
-    qemu_get_be32s (f, &s->speaker);
-    qemu_get_be32s (f, &s->needed_bytes);
-    qemu_get_be32s (f, &s->cmd);
-    qemu_get_be32s (f, &s->use_hdma);
-    qemu_get_be32s (f, &s->highspeed);
-    qemu_get_be32s (f, &s->can_write);
-    qemu_get_be32s (f, &s->v2x6);
+    s->dma_auto=qemu_get_be32 (f);
+    s->block_size=qemu_get_be32 (f);
+    s->fifo=qemu_get_be32 (f);
+    s->freq=qemu_get_be32 (f);
+    s->time_const=qemu_get_be32 (f);
+    s->speaker=qemu_get_be32 (f);
+    s->needed_bytes=qemu_get_be32 (f);
+    s->cmd=qemu_get_be32 (f);
+    s->use_hdma=qemu_get_be32 (f);
+    s->highspeed=qemu_get_be32 (f);
+    s->can_write=qemu_get_be32 (f);
+    s->v2x6=qemu_get_be32 (f);
 
     qemu_get_8s (f, &s->csp_param);
     qemu_get_8s (f, &s->csp_value);
@@ -1342,21 +1342,21 @@ static int SB_load (QEMUFile *f, void *o
     qemu_get_buffer (f, s->csp_regs, 256);
     qemu_get_8s (f, &s->csp_index);
     qemu_get_buffer (f, s->csp_reg83, 4);
-    qemu_get_be32s (f, &s->csp_reg83r);
-    qemu_get_be32s (f, &s->csp_reg83w);
+    s->csp_reg83r=qemu_get_be32 (f);
+    s->csp_reg83w=qemu_get_be32 (f);
 
     qemu_get_buffer (f, s->in2_data, sizeof (s->in2_data));
     qemu_get_buffer (f, s->out_data, sizeof (s->out_data));
     qemu_get_8s (f, &s->test_reg);
     qemu_get_8s (f, &s->last_read_byte);
 
-    qemu_get_be32s (f, &s->nzero);
-    qemu_get_be32s (f, &s->left_till_irq);
-    qemu_get_be32s (f, &s->dma_running);
-    qemu_get_be32s (f, &s->bytes_per_second);
-    qemu_get_be32s (f, &s->align);
-
-    qemu_get_be32s (f, &s->mixer_nreg);
+    s->nzero=qemu_get_be32 (f);
+    s->left_till_irq=qemu_get_be32 (f);
+    s->dma_running=qemu_get_be32 (f);
+    s->bytes_per_second=qemu_get_be32 (f);
+    s->align=qemu_get_be32 (f);
+
+    s->mixer_nreg=qemu_get_be32 (f);
     qemu_get_buffer (f, s->mixer_regs, 256);
 
     if (s->voice) {
diff -r 0f0d67f29ccb tools/ioemu/hw/usb-hid.c
--- a/tools/ioemu/hw/usb-hid.c  Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/usb-hid.c  Tue Jan 08 14:48:38 2008 +0100
@@ -523,15 +523,15 @@ void usb_mouse_save(QEMUFile *f, void *o
 {
     USBMouseState *s = (USBMouseState*)opaque;
 
-    qemu_put_be32s(f, &s->dx);
-    qemu_put_be32s(f, &s->dy);
-    qemu_put_be32s(f, &s->dz);
-    qemu_put_be32s(f, &s->buttons_state);
-    qemu_put_be32s(f, &s->x);
-    qemu_put_be32s(f, &s->y);
-    qemu_put_be32s(f, &s->kind);
-    qemu_put_be32s(f, &s->mouse_grabbed);
-    qemu_put_be32s(f, &s->status_changed);
+    qemu_put_be32(f, s->dx);
+    qemu_put_be32(f, s->dy);
+    qemu_put_be32(f, s->dz);
+    qemu_put_be32(f, s->buttons_state);
+    qemu_put_be32(f, s->x);
+    qemu_put_be32(f, s->y);
+    qemu_put_be32(f, s->kind);
+    qemu_put_be32(f, s->mouse_grabbed);
+    qemu_put_be32(f, s->status_changed);
 
 }
 
@@ -542,15 +542,15 @@ int usb_mouse_load(QEMUFile *f, void *op
     if (version_id != 1)
         return -EINVAL;
 
-    qemu_get_be32s(f, &s->dx);
-    qemu_get_be32s(f, &s->dy);
-    qemu_get_be32s(f, &s->dz);
-    qemu_get_be32s(f, &s->buttons_state);
-    qemu_get_be32s(f, &s->x);
-    qemu_get_be32s(f, &s->y);
-    qemu_get_be32s(f, &s->kind);
-    qemu_get_be32s(f, &s->mouse_grabbed);
-    qemu_get_be32s(f, &s->status_changed);
+    s->dx=qemu_get_be32(f);
+    s->dy=qemu_get_be32(f);
+    s->dz=qemu_get_be32(f);
+    s->buttons_state=qemu_get_be32(f);
+    s->x=qemu_get_be32(f);
+    s->y=qemu_get_be32(f);
+    s->kind=qemu_get_be32(f);
+    s->mouse_grabbed=qemu_get_be32(f);
+    s->status_changed=qemu_get_be32(f);
 
     if ( s->kind == USB_TABLET) {
         fprintf(logfile, "usb_mouse_load:add usb_tablet_event.\n");
diff -r 0f0d67f29ccb tools/ioemu/hw/usb.c
--- a/tools/ioemu/hw/usb.c      Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/usb.c      Tue Jan 08 14:48:38 2008 +0100
@@ -205,17 +205,17 @@ void generic_usb_save(QEMUFile* f, void 
 {
     USBDevice *s = (USBDevice*)opaque;
 
-    qemu_put_be32s(f, &s->speed);
+    qemu_put_be32(f, s->speed);
     qemu_put_8s(f, &s->addr);
-    qemu_put_be32s(f, &s->state);
+    qemu_put_be32(f, s->state);
 
     qemu_put_buffer(f, s->setup_buf, 8);
     qemu_put_buffer(f, s->data_buf, 1024);
 
-    qemu_put_be32s(f, &s->remote_wakeup);
-    qemu_put_be32s(f, &s->setup_state);
-    qemu_put_be32s(f, &s->setup_len);
-    qemu_put_be32s(f, &s->setup_index);
+    qemu_put_be32(f, s->remote_wakeup);
+    qemu_put_be32(f, s->setup_state);
+    qemu_put_be32(f, s->setup_len);
+    qemu_put_be32(f, s->setup_index);
 
 }
 
@@ -226,17 +226,17 @@ int generic_usb_load(QEMUFile* f, void *
     if (version_id != 1)
         return -EINVAL;
 
-    qemu_get_be32s(f, &s->speed);
+    s->speed=qemu_get_be32(f);
     qemu_get_8s(f, &s->addr);
-    qemu_get_be32s(f, &s->state);
+    s->state=qemu_get_be32(f);
 
     qemu_get_buffer(f, s->setup_buf, 8);
     qemu_get_buffer(f, s->data_buf, 1024);
 
-    qemu_get_be32s(f, &s->remote_wakeup);
-    qemu_get_be32s(f, &s->setup_state);
-    qemu_get_be32s(f, &s->setup_len);
-    qemu_get_be32s(f, &s->setup_index);
+    s->remote_wakeup=qemu_get_be32(f);
+    s->setup_state=qemu_get_be32(f);
+    s->setup_len=qemu_get_be32(f);
+    s->setup_index=qemu_get_be32(f);
 
     return 0;
 }
diff -r 0f0d67f29ccb tools/ioemu/hw/vga.c
--- a/tools/ioemu/hw/vga.c      Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/hw/vga.c      Tue Jan 08 14:48:38 2008 +0100
@@ -1757,12 +1757,12 @@ static void vga_save(QEMUFile *f, void *
     qemu_put_buffer(f, s->gr, 16);
     qemu_put_8s(f, &s->ar_index);
     qemu_put_buffer(f, s->ar, 21);
-    qemu_put_be32s(f, &s->ar_flip_flop);
+    qemu_put_be32(f, s->ar_flip_flop);
     qemu_put_8s(f, &s->cr_index);
     qemu_put_buffer(f, s->cr, 256);
     qemu_put_8s(f, &s->msr);
     qemu_put_8s(f, &s->fcr);
-    qemu_put_8s(f, &s->st00);
+    qemu_put_byte(f, s->st00);
     qemu_put_8s(f, &s->st01);
 
     qemu_put_8s(f, &s->dac_state);
@@ -1772,7 +1772,7 @@ static void vga_save(QEMUFile *f, void *
     qemu_put_buffer(f, s->dac_cache, 3);
     qemu_put_buffer(f, s->palette, 768);
 
-    qemu_put_be32s(f, &s->bank_offset);
+    qemu_put_be32(f, s->bank_offset);
 #ifdef CONFIG_BOCHS_VBE
     qemu_put_byte(f, 1);
     qemu_put_be16s(f, &s->vbe_index);
@@ -1814,7 +1814,7 @@ static int vga_load(QEMUFile *f, void *o
     qemu_get_buffer(f, s->gr, 16);
     qemu_get_8s(f, &s->ar_index);
     qemu_get_buffer(f, s->ar, 21);
-    qemu_get_be32s(f, &s->ar_flip_flop);
+    s->ar_flip_flop=qemu_get_be32(f);
     qemu_get_8s(f, &s->cr_index);
     qemu_get_buffer(f, s->cr, 256);
     qemu_get_8s(f, &s->msr);
@@ -1829,7 +1829,7 @@ static int vga_load(QEMUFile *f, void *o
     qemu_get_buffer(f, s->dac_cache, 3);
     qemu_get_buffer(f, s->palette, 768);
 
-    qemu_get_be32s(f, &s->bank_offset);
+    s->bank_offset=qemu_get_be32(f);
     is_vbe = qemu_get_byte(f);
 #ifdef CONFIG_BOCHS_VBE
     if (!is_vbe)
diff -r 0f0d67f29ccb tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Fri Dec 21 23:58:29 2007 +0100
+++ b/tools/ioemu/vl.c  Tue Jan 08 14:48:38 2008 +0100
@@ -940,7 +940,7 @@ static void timer_save(QEMUFile *f, void
     if (cpu_ticks_enabled) {
         hw_error("cannot save state if virtual timers are running");
     }
-    qemu_put_be64s(f, &cpu_clock_offset);
+    qemu_put_be64(f, cpu_clock_offset);
 }
 
 static int timer_load(QEMUFile *f, void *opaque, int version_id)
@@ -951,7 +951,7 @@ static int timer_load(QEMUFile *f, void 
         return -EINVAL;
     }
 
-    qemu_get_be64s(f, &cpu_clock_offset);
+    cpu_clock_offset=qemu_get_be64(f);
     return 0;
 }
 #else  /* !CONFIG_DM */
@@ -960,9 +960,9 @@ static void timer_save(QEMUFile *f, void
     if (cpu_ticks_enabled) {
         hw_error("cannot save state if virtual timers are running");
     }
-    qemu_put_be64s(f, &cpu_ticks_offset);
-    qemu_put_be64s(f, &ticks_per_sec);
-    qemu_put_be64s(f, &cpu_clock_offset);
+    qemu_put_be64(f, cpu_ticks_offset);
+    qemu_put_be64(f, ticks_per_sec);
+    qemu_put_be64(f, cpu_clock_offset);
 }
 
 static int timer_load(QEMUFile *f, void *opaque, int version_id)
@@ -972,10 +972,10 @@ static int timer_load(QEMUFile *f, void 
     if (cpu_ticks_enabled) {
         return -EINVAL;
     }
-    qemu_get_be64s(f, &cpu_ticks_offset);
-    qemu_get_be64s(f, &ticks_per_sec);
+    cpu_ticks_offset=qemu_get_be64(f);
+    ticks_per_sec=qemu_get_be64(f);
     if (version_id == 2) {
-        qemu_get_be64s(f, &cpu_clock_offset);
+        cpu_clock_offset=qemu_get_be64(f);
     }
     return 0;
 }
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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