]> Git Repo - qemu.git/blobdiff - migration.c
Merge remote branch 'mst/for_anthony' into staging
[qemu.git] / migration.c
index 468d51749f4cc190662e2741ebfaf27b3aab4719..622a9d2d95a45ffbecd49f4ffa83f28470305f1a 100644 (file)
@@ -32,7 +32,7 @@
 #endif
 
 /* Migration speed throttling */
-static uint32_t max_throttle = (32 << 20);
+static int64_t max_throttle = (32 << 20);
 
 static MigrationState *current_migration;
 
@@ -132,11 +132,13 @@ int do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data)
 
 int do_migrate_set_speed(Monitor *mon, const QDict *qdict, QObject **ret_data)
 {
-    double d;
+    int64_t d;
     FdMigrationState *s;
 
-    d = qdict_get_double(qdict, "value");
-    d = MAX(0, MIN(UINT32_MAX, d));
+    d = qdict_get_int(qdict, "value");
+    if (d < 0) {
+        d = 0;
+    }
     max_throttle = d;
 
     s = migrate_to_fms(current_migration);
This page took 0.023119 seconds and 4 git commands to generate.