diff mbox series

vnc-stubs: Allow -vnc none

Message ID 20201009014032.3507-1-jandryuk@gmail.com (mailing list archive)
State New, archived
Headers show
Series vnc-stubs: Allow -vnc none | expand

Commit Message

Jason Andryuk Oct. 9, 2020, 1:40 a.m. UTC
Currently `-vnc none` is fatal when built with `--disable-vnc`.  Make
vnc_parse accept "none", so QEMU still run without using vnc.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
---
 ui/vnc-stubs.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Gerd Hoffmann Oct. 13, 2020, 10:52 a.m. UTC | #1
On Thu, Oct 08, 2020 at 09:40:32PM -0400, Jason Andryuk wrote:
> Currently `-vnc none` is fatal when built with `--disable-vnc`.  Make
> vnc_parse accept "none", so QEMU still run without using vnc.
> 
> Signed-off-by: Jason Andryuk <jandryuk@gmail.com>

Makes sense.  Added to UI queue.

thanks,
  Gerd
diff mbox series

Patch

diff --git a/ui/vnc-stubs.c b/ui/vnc-stubs.c
index 06c4ac6296..c6b737dcec 100644
--- a/ui/vnc-stubs.c
+++ b/ui/vnc-stubs.c
@@ -12,6 +12,9 @@  int vnc_display_pw_expire(const char *id, time_t expires)
 };
 QemuOpts *vnc_parse(const char *str, Error **errp)
 {
+    if (strcmp(str, "none") == 0) {
+        return NULL;
+    }
     error_setg(errp, "VNC support is disabled");
     return NULL;
 }