qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] balloon: Don't try fetching info if machine is


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH] balloon: Don't try fetching info if machine is stopped
Date: Thu, 19 Aug 2010 09:56:16 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5

On 08/19/2010 06:14 AM, Amit Shah wrote:
+    get_cached_data = 0;
+    if (!vm_running) {
+        get_cached_data = 1;
+    }

    get_cached_data = !vm_running;

Alternatively, see below...

+    ret = qemu_balloon_status(cb, opaque, get_cached_data);
      if (!ret) {

Piggybacking on the existing coding style thread, here

    ret = qemu_balloon_status(cb, opaque, !vm_running);

would be quite hard to read indeed.  Maybe we can use something like this:

    ret = qemu_balloon_status(cb, opaque,
                              /*get_cached_data=*/ !vm_running);

?

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]