From: Thorsten Zitterell <the.real.hik@gmx.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] hw/pflash_cfi01.c
Date: Sat, 17 Nov 2007 19:56:13 +0100 [thread overview]
Message-ID: <473F394D.1010902@gmx.net> (raw)
[-- 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:
reply other threads:[~2007-11-17 18:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=473F394D.1010902@gmx.net \
--to=the.real.hik@gmx.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).