20ee78b qemu: domain: Properly lookup top of chain in qemuDomainGetStorageSourceByDevstr

Authored and Committed by Peter Krempa 7 years ago
    qemu: domain: Properly lookup top of chain in qemuDomainGetStorageSourceByDevstr
    
    When idx is 0 virStorageFileChainLookup returns the base (bottom) of the
    backing chain rather than the top. This is expected by the callers of
    qemuDomainGetStorageSourceByDevstr.
    
    Add a special case for idx == 0
    
        
file modified
+4 -1