aboutsummaryrefslogtreecommitdiff
path: root/hw/ide.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-03-17 14:54:15 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-03-17 14:54:15 +0000
commit39dfc926df54cd3c85485edc89abba67b39ccb7f (patch)
tree0bf2da12e4ccfc4492c90fdeb26c323a534e46bd /hw/ide.c
parent36bc0bc9d7cf1df5335cb633306f0eea2c231cb0 (diff)
downloadqemu-39dfc926df54cd3c85485edc89abba67b39ccb7f.zip
qemu-39dfc926df54cd3c85485edc89abba67b39ccb7f.tar.gz
qemu-39dfc926df54cd3c85485edc89abba67b39ccb7f.tar.bz2
Allow disabling IDE block mode, by Carlo Marcelo Arenas Belon.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2484 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/ide.c')
-rw-r--r--hw/ide.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/ide.c b/hw/ide.c
index 9e5451f..d9c02ab 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -1631,9 +1631,9 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val)
ide_set_irq(s);
break;
case WIN_SETMULT:
- if ((s->nsector & 0xff) > MAX_MULT_SECTORS ||
- s->nsector == 0 ||
- (s->nsector & (s->nsector - 1)) != 0) {
+ if ((s->nsector & 0xff) != 0 &&
+ ((s->nsector & 0xff) > MAX_MULT_SECTORS ||
+ (s->nsector & (s->nsector - 1)) != 0)) {
ide_abort_command(s);
} else {
s->mult_sectors = s->nsector & 0xff;