1. 17 4月, 2010 2 次提交
  2. 16 4月, 2010 16 次提交
    • J
      Use virCheckFlags for APIs added in 0.8.0 · 7a2c6222
      Jiri Denemark 提交于
      7a2c6222
    • J
      Introduce virCheckFlags for consistent flags checking · 070da02f
      Jiri Denemark 提交于
      The idea is that every API implementation in driver which has flags
      parameter should first call virCheckFlags() macro to check the function
      was called with supported flags:
      
          virCheckFlags(VIR_SUPPORTED_FLAG_1 |
                        VIR_SUPPORTED_FLAG_2 |
                        VIR_ANOTHER_SUPPORTED_FLAG, -1);
      
      The error massage which is printed when unsupported flags are passed
      looks like:
      
          invalid argument in virFooBar: unsupported flags (0x2)
      
      Where the unsupported flags part only prints those flags which were
      passed but are not supported rather than all flags passed.
      070da02f
    • S
      nwfilter: Clear all state tracking from a drop rule · d2327278
      Stefan Berger 提交于
      Don't use state-matching in a drop rule.
      d2327278
    • M
      esx: Replace scanf with STRSKIP and strtok_r · 3a7f2fc3
      Matthias Bolte 提交于
      This also fixes a portability problem with the %a format modifier.
      %a is not portable and made esxDomainDumpXML fail at runtime in
      MinGW builds.
      3a7f2fc3
    • M
      Update to latest gnulib to get strtok_r relaxed to LGPLv2+ · 7ca6a099
      Matthias Bolte 提交于
      strtok_r will be used in the ESX driver to replace scanf-based code.
      
      MinGW lacks strtok_r, so we need gnulib to provide it, but until now
      strtok_r was licensed LGPL3.
      7ca6a099
    • M
      esx: Add nwfilter driver stub · 77408cc0
      Matthias Bolte 提交于
      This stops libvirt trying to connect to a non-existing libvirtd on the
      ESX server in order to find a nwfilter driver.
      77408cc0
    • E
      remote: react to failures on wakeupFD · ec724071
      Eric Blake 提交于
      * src/remote/remote_driver.c (remoteIO, remoteIOEventLoop): Report
      failures on pipe used for wakeup.
      Reported by Chris Lalancette.
      ec724071
    • E
      util: ensure safe{read,write,zero} return is checked · f9f6c34c
      Eric Blake 提交于
      Based on a warning from coverity.  The safe* functions
      guarantee complete transactions on success, but don't guarantee
      freedom from failure.
      
      * src/util/util.h (saferead, safewrite, safezero): Add
      ATTRIBUTE_RETURN_CHECK.
      * src/remote/remote_driver.c (remoteIO, remoteIOEventLoop): Ignore
      some failures.
      (remoteIOReadBuffer): Adjust error messages on read failure.
      * daemon/event.c (virEventHandleWakeup): Ignore read failure.
      f9f6c34c
    • E
      maint: another preprocessor fix · cf4dee36
      Eric Blake 提交于
      Regression introduced in commit 62170b99.
      
      * src/util/memory.h: Placate cppi, and fit 80 columns.
      cf4dee36
    • D
      Fix CDROM media change for QEMU when using -device syntax · c4896d37
      Daniel P. Berrange 提交于
      Disk devices in QEMU have two parts, the guest device and the host
      backend driver. Historically these two parts have had the same
      "unique" name. With the switch to using -device though, they now
      have separate names. Thus when changing CDROM media, for guests
      using -device syntax, we need to prepend the QEMU_DRIVE_HOST_PREFIX
      constant
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add helper function
        qemuDeviceDriveHostAlias() for building a host backend alias
      * src/qemu/qemu_driver.c: Use qemuDeviceDriveHostAlias() to determine
        the host backend alias for performing eject/change commands in the
        monitor
      c4896d37
    • D
      Update QEMU device_add command in JSON mode · db336caa
      Daniel P. Berrange 提交于
      The device_add command was added in JSON mode in a way I didn't
      expect. Instead of passing the normal device string to the JSON
      command:
      
          { "execute": "device_add", "arguments": { "device": "ne2k_pci,id=nic.1,netdev=net.1" } }
      
      We need to split up the device string into a full JSON object
      
          { "execute": "device_add", "arguments": { "driver": "ne2k_pci", "id": "nic.1", "netdev": "net.1" } }
      
      * src/qemu/qemu_conf.h, src/qemu/qemu_conf.c: Rename the
        qemuCommandLineParseKeywords method to qemuParseKeywords
        and export it to monitor
      * src/qemu/qemu_monitor_json.c: Split up device string into
        a JSON object for device_add command
      db336caa
    • D
      Rename parameter in qemuMonitorDeviceDel · fde060b8
      Daniel P. Berrange 提交于
      The parameter for the qemuMonitorDeviceDel() is a device alias,
      not a device config string. Rename the parameter reflect this
      and avoid confusion to readers.
      
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h,
        src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h:
        Rename devicestr to devalias in qemuMonitorDeviceDel()
      fde060b8
    • D
      Remove code from JSON monitor for commands that won't be ported · efd4ee78
      Daniel P. Berrange 提交于
      The QEMU developers have stated that they will not be porting
      the commands 'pci_add', 'pci_del', 'usb_add', 'usb_del' to the
      JSON mode monitor, since they're obsoleted by 'device_add'
      and 'device_del'. libvirt has (untested) code that would have
      supported those commands in theory, but since we already use
      device_add/del where available, there's no need to keep the
      legacy stuff anymore.
      
      The text mode monitor keeps support for all commands for sake
      of historical compatability.
      
      * src/qemu/qemu_monitor_json.c: Remove 'pci_add', 'pci_del',
        'usb_add', 'usb_del' commands
      efd4ee78
    • D
      Run test suite as part of RPM build process · f6770e86
      Daniel P. Berrange 提交于
      To ensure that patches in the RPM don't break any functionality
      it is neccessary to run the test suites during build. It currently
      has 3 tests disabled
      
       - daemon-conf: this is totally broken, since it relies on
         being able to resolve the 'libvirt' group & being able to
         resolve hostnames at daemon startup. This isn't possible
         in a mock build root
       - seclabeltest: fails to initialize selinux in the mock
         build root. Possibly fixable
       - nodeinfotest: broken on s390 + ppc - this is a real bug
      
      * libvirt.spec.in: Add a %check section, with 3 tests
         temporarily disabled
      f6770e86
    • D
      Fix QEMU memory stats JSON mode · 4f81919a
      Daniel P. Berrange 提交于
      The QEMU driver is mistakenly calling directly into the text
      mode monitor for the domain memory stats query.
      
      * src/qemu/qemu_driver.c: Replace qemuMonitorTextGetMemoryStats with
        qemuMonitorGetMemoryStats
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add the new
        wrapper for qemuMonitorGetMemoryStats
      * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h: Add
        qemuMonitorJSONGetMemoryStats implementation
      4f81919a
    • D
      Fix QEMU command building errors to reflect unsupported configuration · 3fb992c6
      Daniel P. Berrange 提交于
      Instead of reporting VIR_ERR_INTERNAL_ERROR use the more specific
      VIR_ERR_CONFIG_UNSUPPORTED
      
      * src/qemu/qemu_conf.c: Report VIR_ERR_CONFIG_UNSUPPORTED for
        unsupported video adapters
      3fb992c6
  3. 15 4月, 2010 4 次提交
  4. 14 4月, 2010 1 次提交
    • D
      Implement variable length structure allocator · 62170b99
      David Allan 提交于
      * This patch implements a memory allocator to obtain memory for
        structures whose last member is a variable length array.  C99 refers
        to these variable length objects as structs containing flexible
        array members.
      * Fixed macro parentheses per Eric Blake
      62170b99
  5. 15 4月, 2010 9 次提交
  6. 14 4月, 2010 8 次提交
    • J
      schematestutils.sh: improve shell portability: avoid "echo -e" · ad896a1c
      Jim Meyering 提交于
      * tests/schematestutils.sh: Use printf rather than echo -e.
      ad896a1c
    • J
      virStorageBackendFileSystemMount: prefer strdup over virAsprintf · 50bf3101
      Jim Meyering 提交于
      * src/storage/storage_backend_fs.c (virStorageBackendFileSystemMount):
      Use virAsprintf only when needed.  In this case, strdup works fine.
      50bf3101
    • J
      virStorageBackendFileSystemMount: placate clang · 5cff81b1
      Jim Meyering 提交于
      * src/storage/storage_backend_fs.c (virStorageBackendFileSystemMount):
      Clang was not smart enough, and mistakenly reported that "options"
      could be used uninitialized.  Initialize it.
      5cff81b1
    • L
      Implement forgotten backend of virInterfaceIsActive() · 9ec18259
      Laine Stump 提交于
      Somehow the backend of this function was never implemented in
      libvirt's netcf driver, and nobody noticed until now. (The required
      netcf function was already in place, so nothing needs to change
      there.)
      * src/interface/netcf_driver.c: add in the backend function, and point
                                      to it from the table of driver functions.
      9ec18259
    • J
      openvzGetProcessInfo: address clang-detected low-probability flaw · 353dd147
      Jim Meyering 提交于
      * src/openvz/openvz_driver.c (openvzGetProcessInfo): Reorganize
      so that unexpected /proc/vz/vestat content cannot make us use
      uninitialized variables.  Without this change, an input line with
      a matching "readvps", but fewer than 4 numbers would result in our
      using at least "systime" uninitialized.
      353dd147
    • J
      vshCommandRun: avoid used-uninitialized timing-related report from clang · cd7ee20a
      Jim Meyering 提交于
      * tools/virsh.c (vshCommandRun): Test only the initial value of
      ctl->timing, so that static analyzers don't have to consider that
      it might be changed by cmd->def->handler.
      cd7ee20a
    • S
      nwfilter: use virFindFileInPath for needed CLI tools · 274f09cb
      Stefan Berger 提交于
      I am getting rid of determining the path to necessary CLI tools at
      compile time. Instead, now the firewall driver has an initialization
      function that uses virFindFileInPath() to determine the path to
      necessary CLI tools and a shutdown function to free allocated memory.
      The rest of the patch mostly deals with availability of the CLI tools
      and to not call certain code blocks if a tool is not available and that
      strings now have to be built slightly differently.
      274f09cb
    • M
      esx: Extend esx_vi_generator.py to cover methods too · 71057b1c
      Matthias Bolte 提交于
      Generate almost all SOAP method mapping code.
      
      Update the driver code to use the complete paramater list of some methods
      that had parameters skipped before.
      
      Improve the ESX_VI__METHOD marco to do automatic output deserialization
      based on output occurrence. Also incorporate automatic _this binding and
      output pointer check.
      71057b1c