1. 25 3月, 2013 2 次提交
    • O
      nodedev: Refactor the helpers · 4360a098
      Osier Yang 提交于
      This adds two util functions (virIsCapableFCHost and virIsCapableVport),
      and rename helper check_fc_host_linux as detect_scsi_host_caps,
      check_capable_vport_linux is removed, as it's abstracted to the util
      function virIsCapableVport. detect_scsi_host_caps nows detect both
      the fc_host and vport_ops capabilities. "stat(2)" is replaced with
      "access(2)" for saving.
      
      * src/util/virutil.h:
        - Declare virIsCapableFCHost and virIsCapableVport
      * src/util/virutil.c:
        - Implement virIsCapableFCHost and virIsCapableVport
      * src/node_device/node_device_linux_sysfs.c:
        - Remove check_capable_vport_linux
        - Rename check_fc_host_linux as detect_scsi_host_caps, and refactor
          it a bit to detect both fc_host and vport_os capabilities
      * src/node_device/node_device_driver.h:
        - Change/remove the related declarations
      * src/node_device/node_device_udev.c: (Use detect_scsi_host_caps)
      * src/node_device/node_device_hal.c: (Likewise)
      * src/node_device/node_device_driver.c (Likewise)
      4360a098
    • O
      nodedev: Use access instead of stat · d91f7dec
      Osier Yang 提交于
      The use of 'stat' in nodeDeviceVportCreateDelete is only to check
      if the file exists or not, it's a bit overkill, and safe to replace
      with the wrapper of access(2) (virFileExists).
      d91f7dec
  2. 12 2月, 2013 1 次提交
  3. 14 1月, 2013 2 次提交
  4. 21 12月, 2012 4 次提交
  5. 21 9月, 2012 1 次提交
  6. 17 9月, 2012 1 次提交
    • O
      list: Implement listAllNodeDevices · c68cd62a
      Osier Yang 提交于
      This simply implements listAllNodeDevices using helper virNodeDeviceList
      
      src/node_device/node_device_driver.h:
        * Declare nodeListAllNodeDevices.
      
      src/node_device/node_device_driver.c:
        * Implement nodeListAllNodeDevices.
      
      src/node_device/node_device_hal.c:
        * Hook listAllNodeDevices to nodeListAllNodeDevices.
      
      src/node_device/node_device_udev.c
        * Hook listAllNodeDevices to nodeListAllNodeDevices.
      c68cd62a
  7. 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
  8. 19 7月, 2012 1 次提交
  9. 10 2月, 2012 1 次提交
    • O
      npiv: Auto-generate WWN if it's not specified · 7c90026d
      Osier Yang 提交于
      The auto-generated WWN comply with the new addressing schema of WWN:
      
      <quote>
      the first nibble is either hex 5 or 6 followed by a 3-byte vendor
      identifier and 36 bits for a vendor-specified serial number.
      </quote>
      
      We choose hex 5 for the first nibble. And for the 3-bytes vendor ID,
      we uses the OUI according to underlying hypervisor type, (invoking
      virConnectGetType to get the virt type). e.g. If virConnectGetType
      returns "QEMU", we use Qumranet's OUI (00:1A:4A), if returns
      ESX|VMWARE, we use VMWARE's OUI (00:05:69). Currently it only
      supports qemu|xen|libxl|xenapi|hyperv|esx|vmware drivers. The last
      36 bits are auto-generated.
      7c90026d
  10. 13 7月, 2011 1 次提交
    • E
      node_device: reject unknown flags · ba78d2cf
      Eric Blake 提交于
      * src/node_device/node_device_driver.c (nodeNumOfDevices)
      (nodeListDevices, nodeDeviceGetXMLDesc, nodeDeviceCreateXML):
      Reject unknown flags.
      * src/node_device/node_device_hal.c (halNodeDrvOpen): Likewise.
      * src/node_device/node_device_udev.c (udevNodeDrvOpen): Likewise.
      ba78d2cf
  11. 06 6月, 2011 1 次提交
  12. 11 5月, 2011 1 次提交
    • M
      Rename internal DumpXML functions to GetXMLDesc · 9817604a
      Matthias Bolte 提交于
      This matches the public API and helps to get rid of some special
      case code in the remote generator.
      
      Rename driver API functions and XDR protocol structs.
      
      No functional change included outside of the remote generator.
      9817604a
  13. 03 12月, 2010 1 次提交
    • J
      Create file in virFileWriteStr() if it doesn't exist · 966a1bfe
      Jean-Baptiste Rouault 提交于
      This patch adds a mode_t parameter to virFileWriteStr().
      If mode is different from 0, virFileWriteStr() will try
      to create the file if it doesn't exist.
      
      * src/util/util.h (virFileWriteStr): Alter signature.
      * src/util/util.c (virFileWriteStr): Allow file creation.
      * src/network/bridge_driver.c (networkEnableIpForwarding)
      (networkDisableIPV6): Adjust clients.
      * src/node_device/node_device_driver.c
      (nodeDeviceVportCreateDelete): Likewise.
      * src/util/cgroup.c (virCgroupSetValueStr): Likewise.
      * src/util/pci.c (pciBindDeviceToStub, pciUnBindDeviceFromStub):
      Likewise.
      966a1bfe
  14. 19 8月, 2010 1 次提交
    • E
      build: fix compiler warning · 9ba934c6
      Eric Blake 提交于
      node_device/node_device_driver.c: In function 'nodeDeviceVportCreateDelete':
      node_device/node_device_driver.c:423: error: implicit declaration of function 'stat' [-Wimplicit-function-declaration]
      
      * src/node_device/node_device_driver.c (includes): Add <sys/stat.h>.
      9ba934c6
  15. 18 8月, 2010 1 次提交
    • D
      nodedev: Fix sysfs paths for vport operations · b31ef773
      Dave Allan 提交于
      Some kernels, such as the one used in RHEL-5, have vport_create and
      vport_delete operation files in /sys/class/scsi_host/hostN directory
      instead of /sys/class/fc_host/hostN. Let's check both paths for
      compatibility reasons.
      
      This also removes unnecessary '/' characters from sysfs paths containing
      LINUX_SYSFS_FC_HOST_PREFIX.
      b31ef773
  16. 08 6月, 2010 1 次提交
  17. 03 6月, 2010 2 次提交
    • D
      Update nodedev scsi_host data before use · 2874a683
      David Allan 提交于
      * It appears that the udev event for HBA creation arrives before the
        associated sysfs data is fully populated, resulting in bogus data
        for the nodedev entry until the entry is refreshed.  This problem is
        particularly troublesome when creating NPIV vHBAs because it results
        in libvirt failing to find the newly created adapter and waiting for
        the full timeout period before erroneously failing the create
        operation.  This patch forces an update before any attempt to use
        any scsi_host nodedev entry.
      2874a683
    • D
      Fix device destroy return value · d3e43bad
      David Allan 提交于
      * Set return value in error cases
      * Clarify error message when parent device is not vport capable
      d3e43bad
  18. 21 5月, 2010 1 次提交
  19. 10 3月, 2010 1 次提交
  20. 10 2月, 2010 1 次提交
  21. 09 2月, 2010 3 次提交
  22. 07 1月, 2010 1 次提交
  23. 14 12月, 2009 1 次提交
    • J
      node_device_driver.c: don't write beyond EOB for 4K-byte symlink · b1483189
      Jim Meyering 提交于
      * src/node_device/node_device_driver.c (update_driver_name): The
      previous code would write one byte beyond the end of the 4KiB
      stack buffer when presented with a symlink value of exactly that
      length (very unlikely).  Remove the automatic buffer and use
      virFileResolveLink in place of readlink.  Suggested by Daniel Veillard.
      b1483189
  24. 19 11月, 2009 2 次提交
    • D
      Removing devicePath member from dev struct · f2f656d4
      Dave Allan 提交于
      I realized that I inadvertently added a member to the def struct to
      contain each device's sysfs path when there was an existing member in the
      dev struct for "OS specific path to device metadat, eg sysfs"  Since the
      udev backend needs to record the sysfs path while it's in the process of
      creating the device, before the dev struct gets allocated, I chose to
      remove the member from the dev struct.
      
      * src/conf/node_device_conf.c src/conf/node_device_conf.h
        src/node_device/node_device_driver.c src/node_device/node_device_hal.c
        src/node_device/node_device_udev.c: remove devicePath from the
        structure and use def->sysfs_path instead
      f2f656d4
    • D
      report OOM in two places in node_device_driver.c · 0fe55374
      Dave Allan 提交于
      * src/node_device/node_device_driver.c: two places where not calling
        virReportOOMError after strdup failure
      0fe55374
  25. 13 11月, 2009 2 次提交
    • D
      Remove DevKit node device backend · e99fb5ed
      David Allan 提交于
      * configure.in src/Makefile.am: remove the configuration check and
        build instructions
      * src/node_device/node_device_devkit.c: removed the module
      * src/node_device/node_device_driver.c src/node_device/node_device_driver.h:
        removed references to the old backend
      e99fb5ed
    • D
      Implement a node device backend using libudev · 3ad6dcf3
      David Allan 提交于
      * configure.in: add new --with-udev, disabled by default, and requiring
        libudev > 145
      * src/node_device/node_device_udev.c src/node_device/node_device_udev.h:
        the new node device backend
      * src/node_device/node_device_linux_sysfs.c: moved node_device_hal_linux.c
        to a better file name
      * src/conf/node_device_conf.c src/conf/node_device_conf.h: add a couple
        of fields in node device definitions, and an API to look them up,
        remove a couple of unused fields from previous patch.
      * src/node_device/node_device_driver.c src/node_device/node_device_driver.h:
        plug the new driver
      * po/POTFILES.in src/Makefile.am src/libvirt_private.syms: add the new
        files and symbols
      * src/util/util.h src/util/util.c: add a new convenience macro
        virBuildPath and virBuildPathInternal() function
      3ad6dcf3
  26. 21 10月, 2009 2 次提交
  27. 06 10月, 2009 2 次提交
  28. 21 9月, 2009 1 次提交