Commit Graph

53 Commits

Author SHA1 Message Date
Kevin Wolf f54e364112 qerror: Add QERR_UNKNOWN_BLOCK_FORMAT_FEATURE
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-10 13:23:44 +01:00
Gerd Hoffmann 180c22e18b pci: allow devices being tagged as not hotpluggable.
This patch adds a field to PCIDeviceInfo to tag devices as being
not hotpluggable.  Any attempt to plug-in or -out such a device
will throw an error.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-01-10 13:29:16 +02:00
Stefan Weil 8b7968f7c4 Use GCC_FMT_ATTR (format checking)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-03 06:34:51 +00:00
Amit Shah 8e84865e54 migration: Accept 'cont' only after successful incoming migration
When a 'cont' is issued on a VM that's just waiting for an incoming
migration, the VM reboots and boots into the guest, possibly corrupting
its storage since it could be shared with another VM running elsewhere.

Ensure that a VM started with '-incoming' is only run when an incoming
migration successfully completes.

A new qerror, QERR_MIGRATION_EXPECTED, is added to signal that 'cont'
failed due to no incoming migration has been attempted yet.

Reported-by: Laine Stump <laine@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-07-30 23:14:08 +02:00
Luiz Capitulino 60d76d7b07 QError: Introduce QERR_QMP_EXTRA_MEMBER
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-07-01 14:27:13 -03:00
Luiz Capitulino 8754c81e11 QError: Enhance QERR_DEVICE_NOT_ACTIVE's user desc
The 'by the guest' part is misleading, it could be disabled by
the host too.

We will likely need more surgery if we care for the distinction,
just dropping the problematic part is good enough for now.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-07-01 14:27:13 -03:00
Luiz Capitulino 41836a9f7e Fix qtypes' licenses
- Change from GPL to LGPL
- Add license text when missing
- Minor cosmetic changes to make all headers look the same

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-05-19 12:45:54 -03:00
Luiz Capitulino abaf2f5271 QError: Improve QERR_QMP_BAD_INPUT_OBJECT desc
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-26 11:17:14 -03:00
Luiz Capitulino 7dfb61238a QError: New QERR_QMP_BAD_INPUT_OBJECT_MEMBER
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-26 11:17:02 -03:00
Markus Armbruster 5124eb5927 error: New QERR_DEVICE_IN_USE
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18 23:46:49 +02:00
Markus Armbruster 985a3e52f0 error: New QERR_INVALID_PARAMETER_VALUE
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18 23:46:48 +02:00
Markus Armbruster 7bc8401712 error: New QERR_DUPLICATE_ID
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18 23:46:48 +02:00
Markus Armbruster 9d494c4b4e error: Put error definitions back in alphabetical order
Add suitable comments to help keerp them in order.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18 23:46:48 +02:00
Markus Armbruster 0167f772d1 error: Move qerror_report() from qemu-error.[ch] to qerror.[ch]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-27 14:30:38 +01:00
Markus Armbruster c8bfe7db27 error: Trim includes in qerror.c
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-27 14:30:36 +01:00
Shahar Havivi 25b28f01d8 QError: New QERR_DEVICE_NOT_ENCRYPTED
Signed-off-by: Shahar Havivi <shaharh@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-03-17 10:41:05 -05:00
Markus Armbruster fab5767f90 error: New QERR_NO_BUS_FOR_DEVICE 2010-03-16 17:45:34 +01:00
Markus Armbruster 4d9a1a1521 error: New QERR_DEVICE_INIT_FAILED 2010-03-16 17:45:34 +01:00
Markus Armbruster 8eae73b5d7 error: New QERR_BUS_NO_HOTPLUG 2010-03-16 17:45:34 +01:00
Markus Armbruster 56e9f56309 error: New QERR_BAD_BUS_FOR_DEVICE 2010-03-16 17:45:34 +01:00
Markus Armbruster 07574baf7b error: New QERR_DEVICE_NO_BUS 2010-03-16 17:45:34 +01:00
Markus Armbruster 1ae7871840 error: New QERR_DEVICE_MULTIPLE_BUSSES 2010-03-16 17:45:34 +01:00
Markus Armbruster 7bbd823701 error: New QERR_BUS_NOT_FOUND 2010-03-16 17:45:34 +01:00
Markus Armbruster 84745d68e7 error: New QERR_PROPERTY_VALUE_NOT_FOUND 2010-03-16 17:45:26 +01:00
Markus Armbruster 9c5eff958d error: New QERR_PROPERTY_VALUE_IN_USE 2010-03-16 17:45:26 +01:00
Markus Armbruster 06b4a703e0 error: New QERR_PROPERTY_VALUE_BAD 2010-03-16 17:01:08 +01:00
Markus Armbruster c58a35f8e3 error: New QERR_PROPERTY_NOT_FOUND 2010-03-16 17:01:08 +01:00
Markus Armbruster fc5469d87b error: Polish human-readable error descriptions
Also put error definitions in alphabetical order
2010-03-16 17:01:08 +01:00
Markus Armbruster 827b08139c error: Infrastructure to track locations for error reporting
New struct Location holds a location.  So far, the only location is
LOC_NONE, so this doesn't do anything useful yet.

Passing the current location all over the place would be too
cumbersome.  Hide it away in static cur_loc instead, and provide
accessors.  Print it in error_report().

Store it in QError, and print it in qerror_print().

Store it in QemuOpt, for use by qemu_opts_foreach().  This makes
error_report() do the right thing when it runs within
qemu_opts_foreach().

We may still have to store it in other data structures holding user
input for better error messages.  Left for another day.
2010-03-16 16:58:32 +01:00
Markus Armbruster 1ecda02b24 error: Replace qemu_error() by error_report()
error_report() terminates the message with a newline.  Strip it it
from its arguments.

This fixes a few error messages lacking a newline:
net_handle_fd_param()'s "No file descriptor named %s found", and
tap_open()'s "vnet_hdr=1 requested, but no kernel support for
IFF_VNET_HDR available" (all three versions).

There's one place that passes arguments without newlines
intentionally: load_vmstate().  Fix it up.
2010-03-16 16:58:32 +01:00
Markus Armbruster 2f7920166d error: Move qemu_error & friends into their own header 2010-03-16 16:55:05 +01:00
Markus Armbruster f34e568853 Revert "QError: New QERR_INVALID_CPU_INDEX"
This reverts commit 64a34bb14c.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03 12:39:01 -06:00
Markus Armbruster 64a34bb14c QError: New QERR_INVALID_CPU_INDEX
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-26 14:55:11 -06:00
Markus Armbruster 3da2c80814 QError: New QERR_OPEN_FILE_FAILED
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-26 14:55:10 -06:00
Markus Armbruster 77e595e7c6 QMP: add human-readable description to error response
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 16:34:36 -06:00
Markus Armbruster a488be27e5 QError: New QERR_TOO_MANY_FILES
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 16:34:36 -06:00
Markus Armbruster 7a046f5f14 New QERR_INVALID_PARAMETER
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 16:34:36 -06:00
Markus Armbruster 41471a2338 QError: New QERR_FD_NOT_SUPPLIED
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 16:34:36 -06:00
Markus Armbruster c7c338c497 QError: New QERR_FD_NOT_FOUND
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 16:34:35 -06:00
Markus Armbruster a6906e31a8 QError: New QERR_VNC_SERVER_FAILED
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 16:34:35 -06:00
Markus Armbruster 7a84cb23c0 QError: New QERR_SET_PASSWD_FAILED
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 16:34:34 -06:00
Markus Armbruster 17901e7532 QError: New QERR_INVALID_BLOCK_FORMAT
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 16:34:34 -06:00
Markus Armbruster 5cfe026475 QError: New QERR_DEVICE_NOT_REMOVABLE
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 16:34:34 -06:00
Markus Armbruster b086838090 QError: New QERR_DEVICE_LOCKED
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 16:34:33 -06:00
Markus Armbruster e16a181222 QError: Put error definitions in alphabetical order
Also fix the odd typoe and clean up whitespace.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 16:34:33 -06:00
Luiz Capitulino 0df37c411c QError: new class for device encrypted errors
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 16:34:32 -06:00
Luiz Capitulino f6d855c50d QError: Add class for invalid passwords
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-07 14:04:19 -06:00
Blue Swirl d05ac8faf5 Add "static" to please Sparse
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-04 20:44:44 +00:00
Luiz Capitulino 4b9d46834d QError: Add errors needed by QMP
Only QERR_QMP_BAD_INPUT_OBJECT is QMP specific, the others can
be used in different contexts by other subsystems.

Please, note that QERR_JSON_PARSING signals any parsing error
from the json parser. We will need it until the parser gets
updated to use QError.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03 09:41:22 -06:00
Luiz Capitulino 82a60711dd QError: Add QERR_KVM_MISSING_CAP
New class for KVM unavailable features errors.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03 09:41:21 -06:00