* [Qemu-devel] [PATCH] hw/pflash_cfi01.c
@ 2007-11-17 18:56 Thorsten Zitterell
0 siblings, 0 replies; only message in thread
From: Thorsten Zitterell @ 2007-11-17 18:56 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 49 bytes --]
Patch to catch wrong/unknown command sequences.
[-- Attachment #2: qemu-pflash-default-catcher.patch --]
[-- Type: text/x-patch, Size: 968 bytes --]
Index: hw/pflash_cfi01.c
===================================================================
RCS file: /sources/qemu/qemu/hw/pflash_cfi01.c,v
retrieving revision 1.2
diff -u -r1.2 pflash_cfi01.c
--- hw/pflash_cfi01.c 17 Nov 2007 17:14:45 -0000 1.2
+++ hw/pflash_cfi01.c 17 Nov 2007 18:51:04 -0000
@@ -353,6 +353,8 @@
pfl->counter--;
break;
+ default:
+ goto error_flash;
}
return;
case 3: /* Confirm mode */
@@ -361,11 +363,14 @@
if (cmd == 0xd0) {
pfl->wcycle = 0;
pfl->status |= 0x80;
- break;
} else {
DPRINTF("%s: unknown command for \"write block\"\n", __func__);
PFLASH_BUG("Write block confirm");
+ goto reset_flash;
}
+ break;
+ default:
+ goto error_flash;
}
return;
default:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-17 18:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-17 18:56 [Qemu-devel] [PATCH] hw/pflash_cfi01.c Thorsten Zitterell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).