]> git.proxmox.com Git - mirror_qemu.git/blobdiff - balloon.c
Update version for v2.9.0-rc3 release
[mirror_qemu.git] / balloon.c
index c7033e3dc334829eb06885eb003da2c60d809f91..1d720fff816e209797ff6fb94037b4bbb8f1b562 100644 (file)
--- a/balloon.c
+++ b/balloon.c
  * THE SOFTWARE.
  */
 
-#include "monitor/monitor.h"
+#include "qemu/osdep.h"
+#include "qemu-common.h"
 #include "exec/cpu-common.h"
 #include "sysemu/kvm.h"
 #include "sysemu/balloon.h"
-#include "trace.h"
+#include "trace-root.h"
 #include "qmp-commands.h"
+#include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qjson.h"
 
 static QEMUBalloonEvent *balloon_event_fn;
 static QEMUBalloonStatus *balloon_stat_fn;
 static void *balloon_opaque;
+static bool balloon_inhibited;
+
+bool qemu_balloon_is_inhibited(void)
+{
+    return balloon_inhibited;
+}
+
+void qemu_balloon_inhibit(bool state)
+{
+    balloon_inhibited = state;
+}
 
 static bool have_balloon(Error **errp)
 {
@@ -96,7 +109,7 @@ void qmp_balloon(int64_t target, Error **errp)
     }
 
     if (target <= 0) {
-        error_set(errp, QERR_INVALID_PARAMETER_VALUE, "target", "a size");
+        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "target", "a size");
         return;
     }