]> Git Repo - qemu.git/commit
qdev: bus walker + qdev_device_add()
authorGerd Hoffmann <[email protected]>
Wed, 15 Jul 2009 11:59:25 +0000 (13:59 +0200)
committerAnthony Liguori <[email protected]>
Mon, 27 Jul 2009 13:39:29 +0000 (08:39 -0500)
commit8ffb1bcf56a4b62d80c8dbefa715cd16394255e0
treef15357f1f5645b5aaf2f3829dd6ce27c7c7a4a73
parentd271de9f1bd7c4671af8cc8edca4ac677371cfff
qdev: bus walker + qdev_device_add()

This patch implements a parser and qdev tree walker for bus paths and
adds qdev_device_add on top of this.

A bus path can be:
  (1) full path, i.e. /i440FX-pcihost/pci.0/lsi/scsi.0
  (2) bus name, i.e. "scsi.0".  Best used together with id= to make
      sure this is unique.
  (3) relative path starting with a bus name, i.e. "pci.0/lsi/scsi.0"

For the (common) case of a single child bus being attached to a device
it is enougth to specify the device only, i.e. "pci.0/lsi" will be
accepted too.

qdev_device_add() adds devices and accepts bus= parameters to find the
bus the device should be attached to.  Without bus= being specified it
takes the first bus it finds where the device can be attached to (i.e.
first pci bus for pci devices, ...).

Signed-off-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
hw/qdev.c
hw/qdev.h
This page took 0.026947 seconds and 4 git commands to generate.