提交 7317b8ca 编写于 作者: B balrog

Fix a && -> & typo.

Catch wrong/unknown NOR flash command sequences, by Thorsten Zitterell.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3684 c046a42c-6fe2-441c-8c8c-71466251a162
上级 9596ebb7
...@@ -353,6 +353,8 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value, ...@@ -353,6 +353,8 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value,
pfl->counter--; pfl->counter--;
break; break;
default:
goto error_flash;
} }
return; return;
case 3: /* Confirm mode */ case 3: /* Confirm mode */
...@@ -361,11 +363,14 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value, ...@@ -361,11 +363,14 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value,
if (cmd == 0xd0) { if (cmd == 0xd0) {
pfl->wcycle = 0; pfl->wcycle = 0;
pfl->status |= 0x80; pfl->status |= 0x80;
break;
} else { } else {
DPRINTF("%s: unknown command for \"write block\"\n", __func__); DPRINTF("%s: unknown command for \"write block\"\n", __func__);
PFLASH_BUG("Write block confirm"); PFLASH_BUG("Write block confirm");
goto reset_flash;
} }
break;
default:
goto error_flash;
} }
return; return;
default: default:
......
...@@ -8269,7 +8269,7 @@ int main(int argc, char **argv) ...@@ -8269,7 +8269,7 @@ int main(int argc, char **argv)
kqemu_allowed = 0; kqemu_allowed = 0;
#endif #endif
linux_boot = (kernel_filename != NULL); linux_boot = (kernel_filename != NULL);
net_boot = (boot_devices_bitmap >> ('n' - 'a')) && 0xF; net_boot = (boot_devices_bitmap >> ('n' - 'a')) & 0xF;
/* XXX: this should not be: some embedded targets just have flash */ /* XXX: this should not be: some embedded targets just have flash */
if (!linux_boot && net_boot == 0 && if (!linux_boot && net_boot == 0 &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册