1. 21 3月, 2014 1 次提交
    • R
      Introduce virFDStreamOpenPTY · 4dae396f
      Roman Bogorodskiy 提交于
      Add virFDStreamOpenPTY() function which is a wrapper around
      virFDStreamOpenFileInternal() with putting the device it opens into a
      raw mode.
      
      Make virChrdevOpen() use virFDStreamOpenPTY() for
      VIR_DOMAIN_CHR_TYPE_PTY devices.
      
      This fixes mangled console output when libvirt runs on FreeBSD as it
      requires device it opens to be placed into a raw mode explicitly.
      4dae396f
  2. 11 5月, 2013 1 次提交
  3. 21 12月, 2012 1 次提交
  4. 21 9月, 2012 1 次提交
  5. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  6. 27 2月, 2012 1 次提交
    • P
      fdstream: Add internal callback on stream close · 0c4bfdda
      Peter Krempa 提交于
      This patch adds another callback to a FDstream object. The original
      callback is used by the daemon stream driver to handle events.
      
      This callback is called if and only if the stream is about to be closed.
      This might be used to handle cleanup steps after a fdstream exits. This
      will be used later on in ensuring mutually exclusive access to consoles.
      
      * src/fdstream.c:
              - emit the callback, when stream is being closed
              - add data structures needed to handle the callback
              - add function to register callback
      * src/fdstream.h:
              - define function prototypes for the callback
      0c4bfdda
  7. 03 8月, 2011 1 次提交
    • E
      fdstream: drop delete argument · 00ef048f
      Eric Blake 提交于
      Revert 6a1f5f56.  Now that libvirt_iohelper takes fds by
      inheritance rather than by open() (commit 1eb66479), there is
      no longer a race where the parent can unlink() a file prior to
      the iohelper open()ing the same file.  From there, it makes
      more sense to have the callers both create and unlink, rather
      than the caller create and the stream unlink, since the latter
      was only needed when iohelper had to do the unlink.
      
      * src/fdstream.h (virFDStreamOpenFile, virFDStreamCreateFile):
      Callers are responsible for deletion.
      * src/fdstream.c (virFDStreamOpenFileInternal): Don't leak created
      file on failure.
      (virFDStreamOpenFile, virFDStreamCreateFile): Drop parameter.
      * src/lxc/lxc_driver.c (lxcDomainOpenConsole): Update callers.
      * src/qemu/qemu_driver.c (qemuDomainScreenshot)
      (qemuDomainOpenConsole): Likewise.
      * src/storage/storage_driver.c (storageVolumeDownload)
      (storageVolumeUpload): Likewise.
      * src/uml/uml_driver.c (umlDomainOpenConsole): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainScreenshot): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise.
      00ef048f
  8. 16 7月, 2011 1 次提交
    • E
      build: add syntax check for proper flags use · 761bbb17
      Eric Blake 提交于
      Enforce the recent flags cleanups - we want to use 'unsigned int flags'
      in any of our APIs (except where backwards compatibility is important,
      in the public migration APIs), and that all flags are checked for
      validity (except when there are stub functions that completely
      ignore the flags argument).
      
      There are a few minor tweaks done here to avoid false positives:
      signed arguments passed to open() are renamed oflags, and flags
      arguments that are legitimately ignored are renamed flags_unused.
      
      * cfg.mk (sc_flags_usage): New rule.
      (exclude_file_name_regexp--sc_flags_usage): And a few exemptions.
      (sc_flags_debug): Tweak wording.
      * src/util/iohelper.c (runIO, main): Rename variable.
      * src/util/util.c (virSetInherit): Likewise.
      * src/fdstream.h (virFDStreamOpenFile, virFDStreamCreateFile):
      Likewise.
      * src/fdstream.c (virFDStreamOpenFileInternal)
      (virFDStreamOpenFile, virFDStreamCreateFile): Likewise.
      * src/util/command.c (virExecWithHook) [WIN32]: Likewise.
      * src/util/util.c (virFileOpenAs, virDirCreate) [WIN32]: Likewise.
      * src/locking/lock_manager.c (virLockManagerPluginNew)
      [!HAVE_DLFCN_H]: Likewise.
      * src/locking/lock_driver_nop.c (virLockManagerNopNew)
      (virLockManagerNopAddResource, virLockManagerNopAcquire)
      (virLockManagerNopRelease, virLockManagerNopInquire): Likewise.
      761bbb17
  9. 13 5月, 2011 1 次提交
    • M
      virFDStream: Add option for delete file after it's opening · 6a1f5f56
      Michal Privoznik 提交于
      This is needed if we want to transfer a temporary file. If the
      transfer is done with iohelper, we might run into a race condition,
      where we unlink() file before iohelper is executed.
      
      * src/fdstream.c, src/fdstream.h,
        src/util/iohelper.c: Add new option
      * src/lxc/lxc_driver.c, src/qemu/qemu_driver.c,
        src/storage/storage_driver.c, src/uml/uml_driver.c,
        src/xen/xen_driver.c: Expand existing function calls
      6a1f5f56
  10. 29 3月, 2011 1 次提交
    • D
      Enhance the streams helper to support plain file I/O · e886237a
      Daniel P. Berrange 提交于
      The O_NONBLOCK flag doesn't work as desired on plain files
      or block devices. Introduce an I/O helper program that does
      the blocking I/O operations, communicating over a pipe that
      can support O_NONBLOCK
      
      * src/fdstream.c, src/fdstream.h: Add non-blocking I/O
        on plain files/block devices
      * src/Makefile.am, src/util/iohelper.c: I/O helper program
      * src/qemu/qemu_driver.c, src/lxc/lxc_driver.c,
        src/uml/uml_driver.c, src/xen/xen_driver.c: Update for
        streams API change
      e886237a
  11. 24 2月, 2011 1 次提交
  12. 12 11月, 2010 1 次提交
    • D
      Add a generic internal API for handling any FD based stream · 7c08fcc4
      Daniel P. Berrange 提交于
      To avoid the need for duplicating implementations of virStream
      drivers, provide a generic implementation that can handle any
      FD based stream. This code is copied from the existing impl
      in the QEMU driver, with the locking moved into the stream
      impl, and addition of a read callback
      
      The FD stream code will refuse to operate on regular files or
      block devices, since those can't report EAGAIN properly when
      they would block on I/O
      
      * include/libvirt/virterror.h, include/libvirt/virterror.h: Add
        VIR_FROM_STREAM error domain
      * src/qemu/qemu_driver.c: Remove code obsoleted by the new
        generic streams driver.
      * src/fdstream.h, src/fdstream.c, src/fdstream.c,
        src/libvirt_private.syms: Generic reusable FD based streams
      7c08fcc4
  13. 10 3月, 2010 1 次提交
  14. 18 1月, 2010 1 次提交
  15. 18 12月, 2009 1 次提交
    • J
      Adds CPU selection infrastructure · 7286882c
      Jiri Denemark 提交于
      Each driver supporting CPU selection must fill in host CPU capabilities.
      When filling them, drivers for hypervisors running on the same node as
      libvirtd can use cpuNodeData() to obtain raw CPU data. Other drivers,
      such as VMware, need to implement their own way of getting such data.
      Raw data can be decoded into virCPUDefPtr using cpuDecode() function.
      
      When implementing virConnectCompareCPU(), a hypervisor driver can just
      call cpuCompareXML() function with host CPU capabilities.
      
      For each guest for which a driver supports selecting CPU models, it must
      set the appropriate feature in guest's capabilities:
      
          virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0)
      
      Actions needed when a domain is being created depend on whether the
      hypervisor understands raw CPU data (currently CPUID for i686, x86_64
      architectures) or symbolic names has to be used.
      
      Typical use by hypervisors which prefer CPUID (such as VMware and Xen):
      
      - convert guest CPU configuration from domain's XML into a set of raw
        data structures each representing one of the feature policies:
      
          cpuEncode(conn, architecture, guest_cpu_config,
                    &forced_data, &required_data, &optional_data,
                    &disabled_data, &forbidden_data)
      
      - create a mask or whatever the hypervisor expects to see and pass it
        to the hypervisor
      
      Typical use by hypervisors with symbolic model names (such as QEMU):
      
      - get raw CPU data for a computed guest CPU:
      
          cpuGuestData(conn, host_cpu, guest_cpu_config, &data)
      
      - decode raw data into virCPUDefPtr with a possible restriction on
        allowed model names:
      
          cpuDecode(conn, guest, data, n_allowed_models, allowed_models)
      
      - pass guest->model and guest->features to the hypervisor
      
      * src/cpu/cpu.c src/cpu/cpu.h src/cpu/cpu_generic.c
        src/cpu/cpu_generic.h src/cpu/cpu_map.c src/cpu/cpu_map.h
        src/cpu/cpu_x86.c src/cpu/cpu_x86.h src/cpu/cpu_x86_data.h
      * configure.in: check for CPUID instruction
      * src/Makefile.am: glue the new files in
      * src/libvirt_private.syms: add new private symbols
      * po/POTFILES.in: add new cpu files containing translatable strings
      7286882c
  16. 21 9月, 2009 1 次提交
    • D
      Move all shared utility files to src/util/ · 1355e055
      Daniel P. Berrange 提交于
      * src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
        src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
        src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
        src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
        src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
        src/qparams.h, src/stats_linux.c, src/stats_linux.h,
        src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
        src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
        src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
        src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
        into src/util/
      * daemon/Makefile.am: Add -Isrc/util/ to build flags
      * src/Makefile.am: Add -Isrc/util/ to build flags and update for
        moved files
      * src/libvirt_private.syms: Export cgroup APIs since they're now
        in util rather than linking directly to drivers
      * src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
        when built under PROXY
      * proxy/Makefile.am: Update for changed file locations. Remove
        bogus build of event.c
      * tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
      1355e055
  17. 16 1月, 2009 1 次提交
  18. 20 11月, 2008 1 次提交
  19. 10 10月, 2008 1 次提交
  20. 21 8月, 2008 1 次提交
  21. 08 2月, 2008 1 次提交
    • M
      Fix gcc-4.3.0 "inlining failed" warning. · 3da5504e
      Mark McLoughlin 提交于
      * src/internal.h: move xstrol() variants from here ...
      
      * src/util.[ch]: ... to here and rename to virStrToLong()
      
      * src/libvirt_sym.version: export __virStrToLong_i() for
      virsh and qemud.
      
      * src/nodeinfo.c, src/stats_linux.c, src/virsh.c,
        src/xend_internal.c, qemud/qemud.c: replace xstrtol()
      calls with virStrToLong()
      
      * src/nodeinfo.h: don't include internal.h, which was only
      needed for xstrtol(), but instead include libvirt.h which
      is suffificient for the declarations in the header.
      3da5504e
  22. 26 7月, 2007 1 次提交
  23. 29 6月, 2007 1 次提交
  24. 27 6月, 2007 10 次提交
  25. 16 3月, 2007 1 次提交
  26. 23 2月, 2007 2 次提交
  27. 15 2月, 2007 1 次提交
    • M
      Tue Feb 14 16:17:51 IST 2007 Mark McLoughlin <markmc@redhat.com> · 8356c43e
      Mark McLoughlin 提交于
              * include/libvirt/libvirt.h.in, src/libvirt.c: add
              virNetworkGetBridgeName() to allow finding out what
              bridge to connect to in order to join a network.
      
              * src/driver.h: add networkGetBridgeName() to vtable.
      
              * qemud/protocol.h: add the request and reply to
              the qemud protocol.
      
              * qemud/dispatch.c, qemud/driver.[ch]: handle them
              here.
      
              * src/qemu_internal.c: implement GetBridgeName()
              in the qemu driver.
      
              * src/libvirt_sym.version: add new symbol.
      8356c43e
  28. 14 2月, 2007 2 次提交