static QEMUBalloonStatus *balloon_stat_fn;
static void *balloon_opaque;
-static bool have_ballon(Error **errp)
+static bool have_balloon(Error **errp)
{
if (kvm_enabled() && !kvm_has_sync_mmu()) {
- error_set(errp, QERR_KVM_MISSING_CAP, "synchronous MMU", "balloon");
+ error_set(errp, ERROR_CLASS_KVM_MISSING_CAP,
+ "Using KVM without synchronous MMU, balloon unavailable");
return false;
}
if (!balloon_event_fn) {
- error_set(errp, QERR_DEVICE_NOT_ACTIVE, "balloon");
+ error_set(errp, ERROR_CLASS_DEVICE_NOT_ACTIVE,
+ "No balloon device has been activated");
return false;
}
return true;
/* We're already registered one balloon handler. How many can
* a guest really have?
*/
- error_report("Another balloon device already registered");
return -1;
}
balloon_event_fn = event_func;
{
BalloonInfo *info;
- if (!have_ballon(errp)) {
+ if (!have_balloon(errp)) {
return NULL;
}
void qmp_balloon(int64_t target, Error **errp)
{
- if (!have_ballon(errp)) {
+ if (!have_balloon(errp)) {
return;
}