]> git.proxmox.com Git - qemu.git/commitdiff
flash device fix
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 4 Jul 2006 09:46:31 +0000 (09:46 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 4 Jul 2006 09:46:31 +0000 (09:46 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2033 c046a42c-6fe2-441c-8c8c-71466251a162

hw/pflash_cfi02.c

index 1f0cbe2f9aa1a8f968a61c003c3044147052e17c..ee2f63a1a0dcd8c41e84ea1f683839c6035175d4 100644 (file)
@@ -42,9 +42,6 @@
 #ifdef PFLASH_DEBUG
 #define DPRINTF(fmt, args...)                      \
 do {                                               \
-    if (loglevel)                                  \
-        fprintf(logfile, "PFLASH: " fmt , ##args); \
-    else                                           \
         printf("PFLASH: " fmt , ##args);           \
 } while (0)
 #else
@@ -213,7 +210,7 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value,
     /* WARNING: when the memory area is in ROMD mode, the offset is a
        ram offset, not a physical address */
     if (pfl->wcycle == 0)
-        offset -= pfl->off;
+        offset -= (target_ulong)(long)pfl->storage;
     else
         offset -= pfl->base;