1. 17 8月, 2012 1 次提交
  2. 15 8月, 2012 1 次提交
  3. 14 8月, 2012 1 次提交
  4. 09 6月, 2012 1 次提交
    • M
      do not include <libutil.h> needlessly or if it doesn't exist · 3294ce18
      Michael Tokarev 提交于
      <libutil.h> and <util.h> on *BSD (some have one, some another)
      were #included just for openpty() declaration.  The only file
      where this function is actually used is qemu-char.c.
      
      In vl.c and net/tap-bsd.c, none of functions declared in libutil.h
      (login logout logwtmp timdomain openpty forkpty uu_lock realhostname
      fparseln and a few others depending on version) are used.
      
      Initially the code which is currently in qemu-char.c was in vl.c,
      it has been removed into separate file in commit 0e82f34d
      Fri Oct 31 18:44:40 2008, but the #includes were left in vl.c.
      So with vl.c, we just remove includes - libutil.h, util.h and
      pty.h (which declares only openpty() and forkpty()) from there.
      
      The code in net/tap-bsd.c, which come from net/tap.c, had this
      
      commit 5281d757
      Author: Mark McLoughlin <markmc@redhat.com>
      Date:   Thu Oct 22 17:49:07 2009 +0100
      
          net: split all the tap code out into net/tap.c
      
      Note this commit not only moved stuff out of net.c to net/tap.c,
      but also rewrote large portions of the tap code, and added these
      completely unnecessary #includes -- as usual, I question why such
      a misleading commit messages are allowed.
      
      Again, no functions defined in libutil.h or util.h on *BSD are
      used by neither net/tap.c nor net/tap-bsd.c.  Removing them.
      
      And finally, the only real user for these #includes, qemu-char.c,
      which actually uses openpty().  There, the #ifdef logic is wrong.
      A GLIBC-based system has <pty.h>, even if it is a variant of *BSD.
      So __GLIBC__ should be checked first, and instead of trying to
      include <libutil.h> or <util.h>, we include <pty.h>.  If it is not
      GLIBC-based, we check for variations between <*util.h> as before.
      
      This patch fixes build of qemu 1.1 on Debian/kFreebsd (well, one
      of the two problems): it is a distribution with a FreeBSD kernel,
      so it #defines at least __FreeBSD_kernel__, but since it is based
      on GLIBC, it has <pty.h>, but current version does not have neither
      <util.h> nor <libutil.h>, which the code tries to include 3 times
      but uses only once.
      Signed-off-By: NMichael Tokarev <mjt@tls.msk.ru>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      3294ce18
  5. 05 6月, 2012 1 次提交
    • L
      qemu-option: qemu_opts_create(): use error_set() · 8be7e7e4
      Luiz Capitulino 提交于
      This commit converts qemu_opts_create() from qerror_report() to
      error_set().
      
      Currently, most calls to qemu_opts_create() can't fail, so most
      callers don't need any changes.
      
      The two cases where code checks for qemu_opts_create() erros are:
      
       1. Initialization code in vl.c. All of them print their own
          error messages directly to stderr, no need to pass the Error
          object
      
       2. The functions opts_parse(), qemu_opts_from_qdict() and
          qemu_chr_parse_compat() make use of the error information and
          they can be called from HMP or QMP. In this case, to allow for
          incremental conversion, we propagate the error up using
          qerror_report_err(), which keeps the QError semantics
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Reviewed-By: NLaszlo Ersek <lersek@redhat.com>
      8be7e7e4
  6. 11 5月, 2012 2 次提交
  7. 24 4月, 2012 1 次提交
  8. 16 4月, 2012 1 次提交
    • J
      Kick io-thread on qemu_chr_accept_input · 98c8ee1d
      Jan Kiszka 提交于
      Once a chr frontend is able to receive input again, we need to inform
      the io-thread about this fact. Otherwise, main_loop_wait may continue to
      select without the related backend file descriptor in its set. This can
      cause high input latencies if only low-rate events arrive otherwise.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      98c8ee1d
  9. 24 2月, 2012 4 次提交
  10. 04 2月, 2012 1 次提交
  11. 29 11月, 2011 1 次提交
  12. 12 11月, 2011 1 次提交
  13. 23 10月, 2011 1 次提交
  14. 14 10月, 2011 1 次提交
  15. 04 10月, 2011 1 次提交
  16. 24 9月, 2011 1 次提交
  17. 22 8月, 2011 13 次提交
  18. 21 8月, 2011 1 次提交
  19. 25 7月, 2011 1 次提交
    • B
      Wrap recv to avoid warnings · 00aa0040
      Blue Swirl 提交于
      Avoid warnings like these by wrapping recv():
        CC    slirp/ip_icmp.o
      /src/qemu/slirp/ip_icmp.c: In function 'icmp_receive':
      /src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' from incompatible pointer type [-Werror]
      /usr/local/lib/gcc/i686-mingw32msvc/4.6.0/../../../../i686-mingw32msvc/include/winsock2.h:547:32: note: expected 'char *' but argument is of type 'struct icmp *'
      
      Remove also casts used to avoid warnings.
      Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      00aa0040
  20. 24 7月, 2011 3 次提交
    • B
      Fix chrdev return value conversion · aad04cd0
      Blue Swirl 提交于
      6e1db57b didn't
      convert brlapi or win32 chrdevs, breaking build for those.
      
      Fix by converting the chrdevs.
      Acked-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      aad04cd0
    • D
      Introduce a 'client_add' monitor command accepting an open FD · 13661089
      Daniel P. Berrange 提交于
      Allow client connections for VNC and socket based character
      devices to be passed in over the monitor using SCM_RIGHTS.
      
      One intended usage scenario is to start QEMU with VNC on a
      UNIX domain socket. An unprivileged user which cannot access
      the UNIX domain socket, can then connect to QEMU's VNC server
      by passing an open FD to libvirt, which passes it onto QEMU.
      
       { "execute": "get_fd", "arguments": { "fdname": "myclient" } }
       { "return": {} }
       { "execute": "add_client", "arguments": { "protocol": "vnc",
                                                 "fdname": "myclient",
                                                 "skipauth": true } }
       { "return": {} }
      
      In this case 'protocol' can be 'vnc' or 'spice', or the name
      of a character device (eg from -chardev id=XXXX)
      
      The 'skipauth' parameter can be used to skip any configured
      VNC authentication scheme, which is useful if the mgmt layer
      talking to the monitor has already authenticated the client
      in another way.
      
      * console.h: Define 'vnc_display_add_client' method
      * monitor.c: Implement 'client_add' command
      * qemu-char.c, qemu-char.h: Add 'qemu_char_add_client' method
      * qerror.c, qerror.h: Add QERR_ADD_CLIENT_FAILED
      * qmp-commands.hx: Declare 'client_add' command
      * ui/vnc.c: Implement 'vnc_display_add_client' method
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      13661089
    • K
      qemu-char: Print strerror message on failure · 6e1db57b
      Kevin Wolf 提交于
      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_.
      
      This patch changes the interface to return 0/-errno and updates
      qemu_chr_open_opts to use strerror to display a more helpful error message.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6e1db57b
  21. 08 6月, 2011 1 次提交
  22. 28 4月, 2011 1 次提交