Browse Source

hw/net/stellaris_enet: Use qemu_log_mask(GUEST_ERROR) instead of hw_error

hw_error() finally calls abort(), but there is no need to abort here.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180624040609.17572-13-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Philippe Mathieu-Daudé 7 năm trước cách đây
mục cha
commit
f6de995714
1 tập tin đã thay đổi với 7 bổ sung2 xóa
  1. 7 2
      hw/net/stellaris_enet.c

+ 7 - 2
hw/net/stellaris_enet.c

@@ -9,6 +9,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
 #include "hw/sysbus.h"
 #include "net/net.h"
 #include "net/net.h"
+#include "qemu/log.h"
 #include <zlib.h>
 #include <zlib.h>
 
 
 //#define DEBUG_STELLARIS_ENET 1
 //#define DEBUG_STELLARIS_ENET 1
@@ -343,7 +344,9 @@ static uint64_t stellaris_enet_read(void *opaque, hwaddr offset,
     case 0x3c: /* Undocumented: Timestamp? */
     case 0x3c: /* Undocumented: Timestamp? */
         return 0;
         return 0;
     default:
     default:
-        hw_error("stellaris_enet_read: Bad offset %x\n", (int)offset);
+        qemu_log_mask(LOG_GUEST_ERROR, "stellaris_enet_rd%d: Illegal register"
+                                       " 0x02%" HWADDR_PRIx "\n",
+                      size * 8, offset);
         return 0;
         return 0;
     }
     }
 }
 }
@@ -442,7 +445,9 @@ static void stellaris_enet_write(void *opaque, hwaddr offset,
         /* Ignored.  */
         /* Ignored.  */
         break;
         break;
     default:
     default:
-        hw_error("stellaris_enet_write: Bad offset %x\n", (int)offset);
+        qemu_log_mask(LOG_GUEST_ERROR, "stellaris_enet_wr%d: Illegal register "
+                                       "0x02%" HWADDR_PRIx " = 0x%" PRIx64 "\n",
+                      size * 8, offset, value);
     }
     }
 }
 }