Diff for /qemu/balloon.c between versions 1.1.1.4 and 1.1.1.5

version 1.1.1.4, 2018/04/24 19:16:40 version 1.1.1.5, 2018/04/24 19:33:37
Line 100  BalloonInfo *qmp_query_balloon(Error **e Line 100  BalloonInfo *qmp_query_balloon(Error **e
     return info;      return info;
 }  }
   
 /**  void qmp_balloon(int64_t value, Error **errp)
  * do_balloon(): Request VM to change its memory allocation  
  */  
 int do_balloon(Monitor *mon, const QDict *params,  
                MonitorCompletion cb, void *opaque)  
 {  {
     int64_t target;  
     int ret;  
   
     if (kvm_enabled() && !kvm_has_sync_mmu()) {      if (kvm_enabled() && !kvm_has_sync_mmu()) {
         qerror_report(QERR_KVM_MISSING_CAP, "synchronous MMU", "balloon");          error_set(errp, QERR_KVM_MISSING_CAP, "synchronous MMU", "balloon");
         return -1;          return;
     }      }
   
     target = qdict_get_int(params, "value");      if (value <= 0) {
     if (target <= 0) {          error_set(errp, QERR_INVALID_PARAMETER_VALUE, "target", "a size");
         qerror_report(QERR_INVALID_PARAMETER_VALUE, "target", "a size");          return;
         return -1;  
     }      }
     ret = qemu_balloon(target);      
     if (ret == 0) {      if (qemu_balloon(value) == 0) {
         qerror_report(QERR_DEVICE_NOT_ACTIVE, "balloon");          error_set(errp, QERR_DEVICE_NOT_ACTIVE, "balloon");
         return -1;  
     }      }
   
     cb(opaque, NULL);  
     return 0;  
 }  }

Removed from v.1.1.1.4  
changed lines
  Added in v.1.1.1.5


unix.superglobalmegacorp.com