diff mbox

eepro100: Allocate a larger buffer for regname()

Message ID 1259202010-20599-1-git-send-email-davidben@mit.edu
State New
Headers show

Commit Message

David Benjamin Nov. 26, 2009, 2:20 a.m. UTC
This should avoid truncating the register name when debugging.

Signed-off-by: David Benjamin <davidben@mit.edu>
---
 hw/eepro100.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Stefan Weil Nov. 27, 2009, 9:31 a.m. UTC | #1
David Benjamin schrieb:
> This should avoid truncating the register name when debugging.
>
> Signed-off-by: David Benjamin <davidben@mit.edu>
> ---
> hw/eepro100.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/eepro100.c b/hw/eepro100.c
> index 8734907..3676dc0 100644
> --- a/hw/eepro100.c
> +++ b/hw/eepro100.c
> @@ -648,7 +648,7 @@ static const char * const reg[PCI_IO_SIZE / 4] = {
>
> static char *regname(uint32_t addr)
> {
> - static char buf[16];
> + static char buf[32];
> if (addr < PCI_IO_SIZE) {
> const char *r = reg[addr / 4];
> if (r != 0) {

This was already fixed in the latest version of eepro100.c
(git://repo.or.cz/qemu/ar7.git).

In "official" QEMU on savannah, it is still missing
(as several other patches, too).

It takes more than a week to get a patch integrated...

Regards,
Stefan
diff mbox

Patch

diff --git a/hw/eepro100.c b/hw/eepro100.c
index 8734907..3676dc0 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -648,7 +648,7 @@  static const char * const reg[PCI_IO_SIZE / 4] = {
 
 static char *regname(uint32_t addr)
 {
-    static char buf[16];
+    static char buf[32];
     if (addr < PCI_IO_SIZE) {
         const char *r = reg[addr / 4];
         if (r != 0) {