qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH for 1.2] memory: Fix copy&paste mistake in memory_re


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH for 1.2] memory: Fix copy&paste mistake in memory_region_iorange_write
Date: Sun, 26 Aug 2012 10:12:47 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

From: Jan Kiszka <address@hidden>

The last argument of find_portio is "write", so this must be true here.

Signed-off-by: Jan Kiszka <address@hidden>
---

We were likely lucky so far and didn't hit this - it would have caused
an assertion. However, there are also rarely used devices...

 memory.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/memory.c b/memory.c
index 643871b..d528d1f 100644
--- a/memory.c
+++ b/memory.c
@@ -426,7 +426,7 @@ static void memory_region_iorange_write(IORange *iorange,
         if (mrp) {
             mrp->write(mr->opaque, offset, data);
         } else if (width == 2) {
-            mrp = find_portio(mr, offset - mrio->offset, 1, false);
+            mrp = find_portio(mr, offset - mrio->offset, 1, true);
             assert(mrp);
             mrp->write(mr->opaque, offset, data & 0xff);
             mrp->write(mr->opaque, offset + 1, data >> 8);
-- 
1.7.3.4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]