pc: Fix error reporting for -boot once
commit8ad00f84251c7aefca26461faccfbb557e1dba47
authorMarkus Armbruster <armbru@redhat.com>
Wed, 17 Feb 2010 17:05:26 +0000 (17 18:05 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 16 Mar 2010 15:55:05 +0000 (16 16:55 +0100)
tree456c0ecba3062d3a1cbd0a19d35b7550bb4a66b8
parent03cd4655cbbc304f355deffd3413f7e3cbbcbe5e
pc: Fix error reporting for -boot once

Commit 0ecdffbb created pc_boot_set() for use from monitor command
"boot_set", via qemu_boot_set().  pc_boot_set() reports errors to
cur_mon, which works fine for monitor code.

Commit e0f084bf reused the function int reset handler
restore_boot_devices().  Use of cur_mon is problematic in that
context.  For instance, the "Too many boot devices for PC" error for
"-boot order=abcdefgh,once=c" goes to the monitor instead of stderr.
The monitor may not even exist.

Fix by switching to qemu_error().
hw/pc.c