]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodedev_udev: Enumerate scsi generic device
authorOsier Yang <jyang@redhat.com>
Mon, 3 Jun 2013 10:05:32 +0000 (18:05 +0800)
committerOsier Yang <jyang@redhat.com>
Tue, 18 Jun 2013 09:17:06 +0000 (17:17 +0800)
commit92fd4c09a47b76847de96958361f2d7bf3f346ed
treec97f602dcac5ce3e3b8125919aeccfb0f02b8f8d
parent0ad9025ef4474bbdaac6d0ba6b4b25c60fec3aa3
nodedev_udev: Enumerate scsi generic device

Since scsi generic device doesn't have DEVTYPE property set, the
only way to know if it's a  scsi generic device or not is to read
the "SUBSYSTEM" property.

The XML of the scsi generic device will be like:

<device>
  <name>scsi_generic_sg0</name>
  <path>/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/scsi_generic/sg0</path>
  <parent>scsi_0_0_0_0</parent>
  <capability type='scsi_generic'>
    <char>/dev/sg0</char>
  </capability>
</device>
src/conf/node_device_conf.c
src/conf/node_device_conf.h
src/node_device/node_device_udev.c