mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-26 14:35:18 +00:00
virstoragefile: Introduce virStorageSourceChainHasNVMe
This function will return true if there's a storage source of type VIR_STORAGE_TYPE_NVME, or false otherwise. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> ACKed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
8cd7196974
commit
a88eef7c48
@ -3074,6 +3074,7 @@ virStoragePRDefIsManaged;
|
|||||||
virStoragePRDefParseXML;
|
virStoragePRDefParseXML;
|
||||||
virStorageSourceBackingStoreClear;
|
virStorageSourceBackingStoreClear;
|
||||||
virStorageSourceChainHasManagedPR;
|
virStorageSourceChainHasManagedPR;
|
||||||
|
virStorageSourceChainHasNVMe;
|
||||||
virStorageSourceClear;
|
virStorageSourceClear;
|
||||||
virStorageSourceCopy;
|
virStorageSourceCopy;
|
||||||
virStorageSourceFindByNodeName;
|
virStorageSourceFindByNodeName;
|
||||||
|
@ -2136,6 +2136,20 @@ virStorageSourceNVMeDefFree(virStorageSourceNVMeDefPtr def)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
virStorageSourceChainHasNVMe(const virStorageSource *src)
|
||||||
|
{
|
||||||
|
const virStorageSource *n;
|
||||||
|
|
||||||
|
for (n = src; virStorageSourceIsBacking(n); n = n->backingStore) {
|
||||||
|
if (n->type == VIR_STORAGE_TYPE_NVME)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
virSecurityDeviceLabelDefPtr
|
virSecurityDeviceLabelDefPtr
|
||||||
virStorageSourceGetSecurityLabelDef(virStorageSourcePtr src,
|
virStorageSourceGetSecurityLabelDef(virStorageSourcePtr src,
|
||||||
const char *model)
|
const char *model)
|
||||||
|
@ -433,6 +433,8 @@ virStorageSourceChainHasManagedPR(virStorageSourcePtr src);
|
|||||||
void virStorageSourceNVMeDefFree(virStorageSourceNVMeDefPtr def);
|
void virStorageSourceNVMeDefFree(virStorageSourceNVMeDefPtr def);
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virStorageSourceNVMeDef, virStorageSourceNVMeDefFree);
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virStorageSourceNVMeDef, virStorageSourceNVMeDefFree);
|
||||||
|
|
||||||
|
bool virStorageSourceChainHasNVMe(const virStorageSource *src);
|
||||||
|
|
||||||
virSecurityDeviceLabelDefPtr
|
virSecurityDeviceLabelDefPtr
|
||||||
virStorageSourceGetSecurityLabelDef(virStorageSourcePtr src,
|
virStorageSourceGetSecurityLabelDef(virStorageSourcePtr src,
|
||||||
const char *model);
|
const char *model);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user