1. 13 7月, 2013 1 次提交
  2. 28 6月, 2013 2 次提交
  3. 14 6月, 2013 1 次提交
    • M
      create qemu_openpty_raw() helper function and move it to a separate file · 4efeabbb
      Michael Tokarev 提交于
      In two places qemu uses openpty() which is very system-dependent,
      and in both places the pty is switched to raw mode as well.
      Make a wrapper function which does both steps, and move all the
      system-dependent complexity into a separate file, together
      with static/local implementations of openpty() and cfmakeraw()
      from qemu-char.c.
      
      It is in a separate file, not part of oslib-posix.c, because
      openpty() often resides in -lutil which is not linked to
      every program qemu builds.
      
      This change removes #including of <pty.h>, <termios.h>
      and other rather specific system headers out of qemu-common.h,
      which isn't a place for such specific headers really.
      
      This version has been verified to build correctly on Linux,
      OpenBSD, FreeBSD and OpenIndiana.  On the latter it lets qemu
      to be built with gtk gui which were not possible there due to
      missing openpty() and cfmakeraw().
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Tested-by: NAndreas Färber <andreas.faerber@web.de>
      4efeabbb
  4. 06 6月, 2013 2 次提交
  5. 22 5月, 2013 1 次提交
  6. 20 5月, 2013 1 次提交
  7. 18 5月, 2013 1 次提交
  8. 16 5月, 2013 1 次提交
  9. 14 5月, 2013 1 次提交
  10. 29 4月, 2013 1 次提交
    • P
      win32: add readv/writev emulation · 9adea5f7
      Paolo Bonzini 提交于
      Commit e9d8fbf5 (qemu-file: do not use stdio for qemu_fdopen, 2013-03-27)
      introduced a usage of writev, which mingw32 does not have.  Even though
      qemu_fdopen itself is not used on mingw32, the future-proof solution is
      to add an implementation of it.  This is simple and similar to how we
      emulate sendmsg/recvmsg in util/iov.c.
      
      Some files include osdep.h without qemu-common.h, so move the definition
      of iovec to osdep.h too, and include osdep.h from qemu-common.h
      unconditionally (protection against including files when NEED_CPU_H is
      defined is not needed since the removal of AREG0).
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9adea5f7
  11. 24 4月, 2013 1 次提交
  12. 14 4月, 2013 1 次提交
  13. 26 3月, 2013 3 次提交
  14. 16 3月, 2013 1 次提交
  15. 27 2月, 2013 1 次提交
  16. 05 2月, 2013 1 次提交
    • E
      cutils: unsigned int parsing functions · e3f9fe2d
      Eduardo Habkost 提交于
      There are lots of duplicate parsing code using strto*() in QEMU, and
      most of that code is broken in one way or another. Even the visitors
      code have duplicate integer parsing code[1]. This introduces functions
      to help parsing unsigned int values: parse_uint() and parse_uint_full().
      
      Parsing functions for signed ints and floats will be submitted later.
      
      parse_uint_full() has all the checks made by opts_type_uint64() at
      opts-visitor.c:
      
       - Check for NULL (returns -EINVAL)
       - Check for negative numbers (returns -EINVAL)
       - Check for empty string (returns -EINVAL)
       - Check for overflow or other errno values set by strtoll() (returns
         -errno)
       - Check for end of string (reject invalid characters after number)
         (returns -EINVAL)
      
      parse_uint() does everything above except checking for the end of the
      string, so callers can continue parsing the remainder of string after
      the number.
      
      Unit tests included.
      
      [1] string-input-visitor.c:parse_int() could use the same parsing code
          used by opts-visitor.c:opts_type_int(), instead of duplicating that
          logic.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      e3f9fe2d
  17. 26 1月, 2013 1 次提交
  18. 09 1月, 2013 1 次提交
  19. 02 1月, 2013 1 次提交
    • S
      iov: add qemu_iovec_concat_iov() · 530c0bbd
      Stefan Hajnoczi 提交于
      The qemu_iovec_concat() function copies a subset of a QEMUIOVector.  The
      new qemu_iovec_concat_iov() function does the same for a iov/cnt pair.
      
      It is easy to define qemu_iovec_concat() in terms of
      qemu_iovec_concat_iov().  The existing code is mostly unchanged, except
      for the assertion src->size >= soffset, which cannot be efficiently
      checked upfront on a iov/cnt pair.  Instead we assert upon hitting the
      end of src with an unsatisfied soffset.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      530c0bbd
  20. 19 12月, 2012 3 次提交
  21. 06 12月, 2012 1 次提交
    • E
      Create qemu-types.h for struct typedefs · 394e1bb7
      Eduardo Habkost 提交于
      Instead of keeping all those struct typedefs in qemu-common.h, move it
      to a header that can be safely included by other headers, containing
      only the struct typedefs and not pulling in other dependencies.
      
      Also, move some of the qdev-core.h typedefs to the new file, too, so
      other headers don't need to include qdev-core.h only because of
      DeviceState and other typedefs.
      
      This will help us remove qemu-common.h dependencies from some headers
      later.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      394e1bb7
  22. 15 11月, 2012 3 次提交
  23. 01 11月, 2012 2 次提交
  24. 31 10月, 2012 2 次提交
  25. 30 10月, 2012 3 次提交
  26. 05 10月, 2012 1 次提交
  27. 23 9月, 2012 1 次提交
  28. 15 8月, 2012 1 次提交