Skip to content
  • Paolo Bonzini's avatar
    qom: use object_resolve_path_type for links · 11e35bfd
    Paolo Bonzini authored
    
    
    This allows to restrict partial matches to objects of the expected
    type.  It will let people use bare names to reference drives
    even though their name might be the same as a device's (e.g.
    -drive id=hd0,if=none,... -device ...,drive=hd0,id=hd0).
    
    As a useful byproduct, this fixes a problem with links of interface
    type.  When a link property's type is an interface, the code expects
    the implementation object (not the parent object) to be stored in the
    variable.  The parent object does not contain the right vtable.
    
    Reviewed-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    11e35bfd