Skip to contentSkip to conversation

Q800 for 5.0 patches

GIT PULL Applied Laurent Vivier 2 participants 3 messages Mar 12, 2020

lore
Share & tools
lore
#0 lore raw

The following changes since commit 104933c4a973960dea605b06fcd5d0d478255d77:

Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2020-03-03 12:03:59 +0000)

are available in the Git repository at:

git://github.com/vivier/qemu-m68k.git tags/q800-for-5.0-pull-request

for you to fetch changes up to 80aab795f8a6d53cdeb55cc6ffac50b5e5ce9dc2:

q800: fix coverity warning CID 1412799 (2020-03-12 16:05:48 +0100)

----------------------------------------------------------------
Fix Coverity CID 1412799 (Error handling issues)

----------------------------------------------------------------

Laurent Vivier (1):
q800: fix coverity warning CID 1412799

 hw/misc/mac_via.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.24.1
#1 lore raw

[PULL 1/1] q800: fix coverity warning CID 1412799

Check the return value of blk_write() and log an error if any

Fixes Coverity CID 1412799 (Error handling issues)

Message-Id: <[email protected]>

---
 hw/misc/mac_via.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
hw/misc/mac_via.c +5 -2
index b7d0012794..81343301b1 100644
@@ -30,6 +30,7 @@
 #include "hw/qdev-properties.h"
 #include "sysemu/block-backend.h"
 #include "trace.h"
+#include "qemu/log.h"
 
 /*
  * VIAs: There are two in every machine,
@@ -381,8 +382,10 @@ static void via2_irq_request(void *opaque, int irq, int level)
 static void pram_update(MacVIAState *m)
 {
     if (m->blk) {
-        blk_pwrite(m->blk, 0, m->mos6522_via1.PRAM,
-                   sizeof(m->mos6522_via1.PRAM), 0);
+        if (blk_pwrite(m->blk, 0, m->mos6522_via1.PRAM,
+                       sizeof(m->mos6522_via1.PRAM), 0) < 0) {
+            qemu_log("pram_update: cannot write to file\n");
+        }
     }
 }
 
Signature · 1 line
2.24.1
#2 lore raw
In reply to Laurent Vivier
Quoted 9 lines · Laurent Vivier

The following changes since commit 104933c4a973960dea605b06fcd5d0d478255d77:

Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2020-03-03 12:03:59 +0000)

are available in the Git repository at:

git://github.com/vivier/qemu-m68k.git tags/q800-for-5.0-pull-request

Quoted 8 lines

for you to fetch changes up to 80aab795f8a6d53cdeb55cc6ffac50b5e5ce9dc2:

q800: fix coverity warning CID 1412799 (2020-03-12 16:05:48 +0100)

----------------------------------------------------------------
Fix Coverity CID 1412799 (Error handling issues)

----------------------------------------------------------------

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.

-- PMM