1. 29 2月, 2012 2 次提交
  2. 27 2月, 2012 5 次提交
  3. 24 2月, 2012 1 次提交
    • M
      Revert "qemu-char: Print strerror message on failure" and deps · 1f51470d
      Markus Armbruster 提交于
      The commit's purpose is laudable:
      
          The only way for chardev drivers to communicate an error was to
          return a NULL pointer, which resulted in an error message that
          said _that_ something went wrong, but not _why_.
      
      It attempts to achieve it by changing the interface to return 0/-errno
      and update qemu_chr_open_opts() to use strerror() to display a more
      helpful error message.  Unfortunately, it has serious flaws:
      
      1. Backends "socket" and "udp" return bogus error codes, because
      qemu_chr_open_socket() and qemu_chr_open_udp() assume that
      unix_listen_opts(), unix_connect_opts(), inet_listen_opts(),
      inet_connect_opts() and inet_dgram_opts() fail with errno set
      appropriately.  That assumption is wrong, and the commit turns
      unspecific error messages into misleading error messages.  For
      instance:
      
          $ qemu-system-x86_64 -nodefaults -vnc :0 -chardev socket,id=bar,host=xxx
          inet_connect: host and/or port not specified
          chardev: opening backend "socket" failed: No such file or directory
      
      ENOENT is what happens to be in my errno when the backend returns
      -errno.  Let's put ERANGE there just for giggles:
      
          $ qemu-system-x86_64 -nodefaults -vnc :0 -chardev socket,id=bar,host=xxx -drive if=none,iops=99999999999999999999
          inet_connect: host and/or port not specified
          chardev: opening backend "socket" failed: Numerical result out of range
      
      Worse: when errno happens to be zero, return -errno erroneously
      signals success, and qemu_chr_new_from_opts() dies dereferencing
      uninitialized chr.  I observe this with "-serial unix:".
      
      2. All qemu_chr_open_opts() knows about the error is an errno error
      code.  That's simply not enough for a decent message.  For instance,
      when inet_dgram() can't resolve the parameter host, which errno code
      should it use?  What if it can't resolve parameter localaddr?
      
      Clue: many backends already report errors in their open methods.
      Let's revert the flawed commit along with its dependencies, and fix up
      the silent error paths instead.
      
      This reverts commit 6e1db57b.
      
      Conflicts:
      
      	console.c
      	hw/baum.c
      	qemu-char.c
      
      This reverts commit aad04cd0.
      
      The parts of commit db418a0a "Add stdio char device on windows" that
      depend on the reverted change fixed up.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      1f51470d
  4. 21 2月, 2012 2 次提交
  5. 17 2月, 2012 1 次提交
  6. 15 2月, 2012 1 次提交
  7. 10 2月, 2012 4 次提交
    • G
      vnc: lift modifier keys on client disconnect. · 7bc9318b
      Gerd Hoffmann 提交于
      For any modifier key (shift, ctrl, alt) still pressed on disconnect
      inject a key-up event into the guest.  The vnc client is gone, it will
      not do that, so qemu has to do it instead.
      
      Without this keys will get stuck, making the guest act in weird ways
      after reconnecting.  Reproducer: exit vnc client via Alt-F4, guest
      continues to see the pressed alt key and will not react to key events
      in any useful way until you tap the alt key once to unstuck it.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      7bc9318b
    • G
      vnc: implement shared flag handling. · 8cf36489
      Gerd Hoffmann 提交于
      VNC clients send a shared flag in the client init message.  Up to now
      qemu completely ignores this.  This patch implements shared flag
      handling.  It comes with three policies:  By default qemu behaves as one
      would expect:  Asking for a exclusive access grants exclusive access to
      the client connecting.  There is also a desktop sharing mode which
      disallows exclusive connects (so one forgetting -shared wouldn't drop
      everybody else) and a compatibility mode which mimics the traditional
      (but non-conforming) qemu behavior.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      8cf36489
    • G
      vnc: fix ctrl key in vnc terminal emulation · e26437c2
      Gerd Hoffmann 提交于
      Make the control keys for terminals on the vnc display
      (i.e. qemu -vnc :0 -serial vc) work.  Makes the terminals
      alot more usable as typing Ctrl-C in your serial console
      actually has the desired effect ;)
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      e26437c2
    • G
      Fix vnc memory corruption with width = 1400 · ce3e1417
      Gerd Hoffmann 提交于
      vnc assumes that the screen width is a multiple of 16 in several places.
      If this is not the case vnc will overrun buffers, corrupt memory, make
      qemu crash.
      
      This is the minimum fix for this bug. It makes sure we don't overrun the
      scanline, thereby fixing the segfault.  The rendering is *not* correct
      though, there is a black border at the right side of the screen, 8
      pixels wide because 1400 % 16 == 8.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      ce3e1417
  8. 02 2月, 2012 5 次提交
  9. 18 1月, 2012 1 次提交
  10. 13 1月, 2012 1 次提交
  11. 14 12月, 2011 1 次提交
  12. 13 12月, 2011 1 次提交
  13. 06 12月, 2011 1 次提交
  14. 02 12月, 2011 1 次提交
  15. 12 11月, 2011 1 次提交
  16. 10 11月, 2011 1 次提交
  17. 02 11月, 2011 2 次提交
  18. 27 10月, 2011 2 次提交
    • L
      qapi: Convert query-spice · d1f29646
      Luiz Capitulino 提交于
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      d1f29646
    • L
      qapi: Convert query-vnc · 2b54aa87
      Luiz Capitulino 提交于
      There are three important remarks in relation to the non-qapi command:
      
       1. This commit also fixes the behavior of the 'query-vnc' and 'info vnc'
          commands to return an error when qemu is built without VNC support
          (ie. --disable-vnc). The non-qapi command would return the OK
          response in QMP and no response in HMP
      
       2. The qapi version explicitly marks the fields 'host', 'family',
          'service' and 'auth' as optional. Their are not documented as optional
          in the non-qapi command doc, but they would not be returned if
          vnc support is disabled. The qapi version maintains the same
          semantics, but documents those fields correctly
      
       3. The 'clients' field, which is a list, is marked as optional but is
          always returned. If there are no clients connected an empty list
          is returned. This is not the Right Way to this in the qapi but it's
          how the non-qapi command used to work
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      2b54aa87
  19. 25 10月, 2011 5 次提交
  20. 20 10月, 2011 1 次提交
  21. 21 9月, 2011 1 次提交