1. 16 6月, 2011 1 次提交
    • A
      Introduce format string for pid_t · 953ffe0f
      Andreas Färber 提交于
      BeOS and Haiku on i386 use long for 32-bit types, including pid_t.
      Using %d with pid_t therefore results in a warning.
      
      Unfortunately POSIX:2008 does not define a PRId* string for pid_t.
      
      In some places pid_t was previously casted to long and %ld hardcoded.
      The predecessor of this patch added another upcast for the simpletrace
      filename but was not applied to date.
      
      Since new uses of pid_t with %d keep creeping in, let's instead define
      an OS-dependent format string and use that consistently.
      
      Cc: Stefan Hajnoczi <stefanha@gmail.com>
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Cc: Ingo Weinhold <ingo_weinhold@gmx.de>
      Cc: Gleb Natapov <gleb@redhat.com>
      Signed-off-by: NAndreas Färber <andreas.faerber@web.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      953ffe0f
  2. 14 6月, 2011 4 次提交
    • A
      libcacard: add libcacard.la target · 44dc0ca3
      Alon Levy 提交于
      No flag to configure is required. Instead, added a libcacard.la target that
      is not built by default, only when requested explicitly via:
      
      mkdir build
      cd build
      ../configure
      make libcacard.la
      make install-libcacard
      
      Uses libtool to do actual linking of object files and shared library, and
      installing. Tested only under linux, but supposed to work on other systems as
      well.
      
      If libtool isn't found you get a message complaining about that, only at build
      time (since it is not a default target I did not add a message at configure
      time).
      
      New build artifacts:
       .libs subdirectories (at <buildroot> and <buildroot>/libcacard)
       *.lo files (at same locations as the respective o files)
      
      Added %.lo : %.c rule that uses libtool.
      Updated clean rule to clean up those artifacts.
      Added specific rule to call dtrace with libtool wrapper (note that because of
      a current upstream dtrace bug fixed by systemtap b1568fd85 commit the -fPIC flag
      isn't actually passed on. still current dtrace+libtool produced object links fine).
      If libtool is missing any of the following targets will complain and exit 1:
       any subdir: *.lo
       root and libcacard: libcacard.la, libcacard-instsall
      
      Tested to link and load with all tracing backends.
      44dc0ca3
    • A
      configure: add libdir and --libdir · 3aa5d2be
      Alon Levy 提交于
      3aa5d2be
    • A
      configure: Fix check for fdatasync() · d1722a27
      Alexandre Raymond 提交于
      Under Darwin, a symbol exists for the fdatasync() function, so that our
      link test succeeds. However _POSIX_SYNCHRONIZED_IO is set to '-1'.
      
      According to POSIX:2008, a value of -1 means the feature is not supported.
      A value of 0 means supported at compilation time, and a value greater 0
      means supported at both compilation and run time.
      
      Enable fdatasync() only if _POSIX_SYNCHRONIZED_IO is '>0'.
      Signed-off-by: NAlexandre Raymond <cerbere@gmail.com>
      Signed-off-by: NAndreas Färber <andreas.faerber@web.de>
      d1722a27
    • P
      configure: Detect and don't try to use older libcurl · 0b862ced
      Peter Maydell 提交于
      Older versions of libcurl don't have some of the features we try to
      use, in particular curl_multi_setopt(). Check for this in the 'is
      libcurl available?' configure test so we disable curl support if the
      library is too old.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
      0b862ced
  3. 08 6月, 2011 1 次提交
  4. 06 6月, 2011 1 次提交
  5. 04 6月, 2011 1 次提交
  6. 03 6月, 2011 1 次提交
  7. 01 6月, 2011 3 次提交
    • R
      target-alpha: Enable the alpha-softmmu target. · b758aca1
      Richard Henderson 提交于
      With all of the pre-existing code that would not compile gone,
      this is the earliest point at which the target can be enabled.
      
      There is no machine defined yet, so this will crash on startup.
      Enable the target anyway, to make sure that further compilation
      problems do not creep back in.
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      b758aca1
    • A
      libcacard: add libcacard.la target · b7b8c618
      Alon Levy 提交于
      No flag to configure is required. Instead, added a libcacard.la target that
      is not built by default, only when requested explicitly via:
      
      mkdir build
      cd build
      ../configure
      make libcacard.la
      make install-libcacard
      
      Uses libtool to do actual linking of object files and shared library, and
      installing. Tested only under linux, but supposed to work on other systems as
      well.
      
      If libtool isn't found you get a message complaining about that, only at build
      time (since it is not a default target I did not add a message at configure
      time).
      
      New build artifacts:
       .libs subdirectories (at <buildroot> and <buildroot>/libcacard)
       *.lo files (at same locations as the respective o files)
      
      Added %.lo : %.c rule that uses libtool.
      Updated clean rule to clean up those artifacts.
      Added specific rule to call dtrace with libtool wrapper (note that because of
      a current upstream dtrace bug fixed by systemtap b1568fd85 commit the -fPIC flag
      isn't actually passed on. still current dtrace+libtool produced object links fine).
      If libtool is missing any of the following targets will complain and exit 1:
       any subdir: *.lo
       root and libcacard: libcacard.la, libcacard-instsall
      
      Tested to link and load with all tracing backends.
      b7b8c618
    • A
      configure: add libdir and --libdir · aedce09e
      Alon Levy 提交于
      aedce09e
  8. 24 5月, 2011 1 次提交
  9. 20 5月, 2011 1 次提交
  10. 15 5月, 2011 2 次提交
  11. 10 5月, 2011 3 次提交
  12. 08 5月, 2011 3 次提交
  13. 27 4月, 2011 4 次提交
  14. 25 4月, 2011 1 次提交
  15. 19 4月, 2011 1 次提交
  16. 13 4月, 2011 2 次提交
  17. 11 4月, 2011 1 次提交
  18. 09 4月, 2011 1 次提交
  19. 07 4月, 2011 1 次提交
  20. 04 4月, 2011 3 次提交
  21. 02 4月, 2011 3 次提交
    • R
      libcacard: initial commit · 111a38b0
      Robert Relyea 提交于
      libcacard emulates a Common Access Card (CAC) which is a standard
      for smartcards. It is used by the emulated ccid card introduced in
      a following patch. Docs are available in docs/libcacard.txt
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      ---
      
      changes from v24->v25:
       * Fix out of tree builds.
       * Fix build with linux-user targets.
      
      changes from v23->v24: (Jes Sorensen review 2)
       * Makefile.target: use obj-$(CONFIG_*) +=
       * remove unrequired includes, include qemu-common before qemu-thread
        * required adding #define NO_NSPR_10_SUPPORT (harmless)
      
      changes from v22->v23:
       * configure fixes: (reported by Stefan Hajnoczi)
        * test a = b, not a == b (second isn't portable)
        * quote $source_path in case it contains spaces
         - this doesn't really help since there are many other places
           that need similar fixes, not introduced by this patch.
      
      changes from v21->v22:
       * fix configure to not link libcacard if nss not found
          (reported by Stefan Hajnoczi)
       * fix vscclient linkage with simpletrace backend
          (reported by Stefan Hajnoczi)
       * card_7816.c: add missing break in ERROR_DATA_NOT_FOUND
          (reported by William van de Velde)
      
      changes from v20->v21: (Jes Sorensen review)
       * use qemu infrastructure: qemu-thread, qemu-common (qemu_malloc
        and qemu_free), error_report
       * assert instead of ASSERT
       * cosmetic fixes
       * use strpbrk and isspace
       * add --disable-nss --enable-nss here, instead of in the final patch.
       * split vscclient, passthru and docs to following patches.
      
      changes from v19->v20:
       * checkpatch.pl
      
      changes from v15->v16:
      
      Build:
       * don't erase self with distclean
       * fix make clean after make distclean
       * Makefile: make vscclient link quiet
      
      Behavioral:
       * vcard_emul_nss: load coolkey in more situations
       * vscclient:
        * use hton,ntoh
        * send init on connect, only start vevent thread on response
        * read payload after header check, before type switch
        * remove Reconnect
        * update for vscard_common changes, empty Flush implementation
      
      Style/Whitespace:
       * fix wrong variable usage
       * remove unused variable
       * use only C style comments
        * add copyright header
        * fix tabulation
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      libcacard: fix out of tree builds
      111a38b0
    • A
      usb-ccid: add CCID bus · 36707144
      Alon Levy 提交于
      A CCID device is a smart card reader. It is a USB device, defined at [1].
      This patch introduces the usb-ccid device that is a ccid bus. Next patches will
      introduce two card types to use it, a passthru card and an emulated card.
      
       [1] http://www.usb.org/developers/devclass_docs/DWG_Smart-Card_CCID_Rev110.
      Signed-off-by: NAlon Levy <alevy@redhat.com>
      
      ---
      
      changes from v20->v21: (Jes Sorenson review)
       * cosmetic changes - fix multi line comments.
       * reorder fields in USBCCIDState
       * add reference to COPYING
       * add --enable-smartcard and --disable-smartcard here (moved
       from last patch)
      
      changes from v19->v20:
       * checkpatch.pl
      
      changes from v18->v19:
       * merged: ccid.h: add copyright, fix define and remove non C89 comments
       * add qdev.desc
      
      changes from v15->v16:
      
      Behavioral changes:
       * fix abort on client answer after card remove
       * enable migration
       * remove side affect code from asserts
       * return consistent self-powered state
       * mask out reserved bits in ccid_set_parameters
       * add missing abRFU in SetParameters (no affect on linux guest)
      
      whitefixes / comments / consts defines:
       * remove stale comment
       * remove ccid_print_pending_answers if no DEBUG_CCID
       * replace printf's with DPRINTF, remove DEBUG_CCID, add verbosity defines
       * use error_report
       * update copyright (most of the code is not original)
       * reword known bug comment
       * add missing closing quote in comment
       * add missing whitespace on one line
       * s/CCID_SetParameter/CCID_SetParameters/
       * add comments
       * use define for max packet size
      
      Comment for "return consistent self-powered state":
      
      the Configuration Descriptor bmAttributes claims we are self powered,
      but we were returning not self powered to USB_REQ_GET_STATUS control message.
      
      In practice, this message is not sent by a linux 2.6.35.10-74.fc14.x86_64
      guest (not tested on other guests), unless you issue lsusb -v as root (for
      example).
      36707144
    • D
      Implement hcall based RTAS for pSeries machines · 39ac8455
      David Gibson 提交于
      On pSeries machines, operating systems can instantiate "RTAS" (Run-Time
      Abstraction Services), a runtime component of the firmware which implements
      a number of low-level, infrequently used operations.  On logical partitions
      under a hypervisor, many of the RTAS functions require hypervisor
      privilege.  For simplicity, therefore, hypervisor systems typically
      implement the in-partition RTAS as just a tiny wrapper around a hypercall
      which actually implements the various RTAS functions.
      
      This patch implements such a hypercall based RTAS for our emulated pSeries
      machine.  A tiny in-partition "firmware" calls a new hypercall, which
      looks up available RTAS services in a table.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      39ac8455
  22. 22 3月, 2011 1 次提交