qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [PATCH v2 5/5] spice-qemu-char: convert qemu_chr_open


From: zhanghailiang
Subject: Re: [Qemu-trivial] [PATCH v2 5/5] spice-qemu-char: convert qemu_chr_open_spice_vmc to use Error API
Date: Mon, 3 Nov 2014 19:17:01 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

On 2014/11/3 18:04, Michael Tokarev wrote:
03.11.2014 12:44, zhanghailiang wrote:
[]
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -4252,7 +4252,7 @@ ChardevReturn *qmp_chardev_add(const char *id, 
ChardevBackend *backend,
  #endif
  #ifdef CONFIG_SPICE
      case CHARDEV_BACKEND_KIND_SPICEVMC:
-        chr = qemu_chr_open_spice_vmc(backend->spicevmc->type);
+        chr = qemu_chr_open_spice_vmc(backend->spicevmc->type, errp);
          break;
      case CHARDEV_BACKEND_KIND_SPICEPORT:
          chr = qemu_chr_open_spice_port(backend->spiceport->fqdn);

Now this is funny.  Why we have two functions nearby using different
error reporting APIs?  Maybe qemu_chr_open_spice_port() should be
converted to Error API too, at the same time (maybe in the same
patch or in a subsequent patch in the same series)?


Actually, after patch 3, there will be no error case for this function, it can 
not
fail, so i just leave it. What's your opinion? Thanks.




reply via email to

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