aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-11 19:47:59 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-11 19:47:59 +0000
commit444ce24195b97d1b425cd250a731e3f5f4b4bbfa (patch)
tree0daca77b516ed9e33d01a47a48486bb6d25f0a8c /hw
parenta702b35388c307ce2364691e2edc14094701c81e (diff)
use correct printf format
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3611 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/pxa.h2
-rw-r--r--hw/pxa2xx_dma.c4
-rw-r--r--hw/spitz.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/hw/pxa.h b/hw/pxa.h
index 037aebee44..5eb6a5982d 100644
--- a/hw/pxa.h
+++ b/hw/pxa.h
@@ -203,7 +203,7 @@ struct pxa2xx_i2s_s {
};
# define PA_FMT "0x%08lx"
-# define REG_FMT "0x%lx"
+# define REG_FMT "0x" TARGET_FMT_plx
struct pxa2xx_state_s *pxa270_init(unsigned int sdram_size, DisplayState *ds,
const char *revision);
diff --git a/hw/pxa2xx_dma.c b/hw/pxa2xx_dma.c
index 53bce2e463..4c60ffd00c 100644
--- a/hw/pxa2xx_dma.c
+++ b/hw/pxa2xx_dma.c
@@ -303,7 +303,7 @@ static uint32_t pxa2xx_dma_read(void *opaque, target_phys_addr_t offset)
}
cpu_abort(cpu_single_env,
- "%s: Bad offset 0x%04lx\n", __FUNCTION__, offset);
+ "%s: Bad offset 0x" TARGET_FMT_plx "\n", __FUNCTION__, offset);
return 7;
}
@@ -401,7 +401,7 @@ static void pxa2xx_dma_write(void *opaque,
break;
}
fail:
- cpu_abort(cpu_single_env, "%s: Bad offset 0x%04lx\n",
+ cpu_abort(cpu_single_env, "%s: Bad offset " TARGET_FMT_plx "\n",
__FUNCTION__, offset);
}
}
diff --git a/hw/spitz.c b/hw/spitz.c
index 68bba18e1e..764b694e17 100644
--- a/hw/spitz.c
+++ b/hw/spitz.c
@@ -12,7 +12,11 @@
#define spitz_printf(format, ...) \
fprintf(stderr, "%s: " format, __FUNCTION__, ##__VA_ARGS__)
#undef REG_FMT
+#if TARGET_PHYS_ADDR_BITS == 32
+#define REG_FMT "0x%02x"
+#else
#define REG_FMT "0x%02lx"
+#endif
/* Spitz Flash */
#define FLASH_BASE 0x0c000000