提交 3858da2a 编写于 作者: J Ján Tomko

Introduce virDomainVsockDef

A type to represent the new vsock device.
Also implement an allocation function to allow future addition
of private data.

https://bugzilla.redhat.com/show_bug.cgi?id=1291851Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 ff57a713
...@@ -2028,6 +2028,28 @@ virDomainActualNetDefFree(virDomainActualNetDefPtr def) ...@@ -2028,6 +2028,28 @@ virDomainActualNetDefFree(virDomainActualNetDefPtr def)
VIR_FREE(def); VIR_FREE(def);
} }
virDomainVsockDefPtr
virDomainVsockDefNew(virDomainXMLOptionPtr xmlopt ATTRIBUTE_UNUSED)
{
virDomainVsockDefPtr ret = NULL;
virDomainVsockDefPtr vsock;
if (VIR_ALLOC(vsock) < 0)
return NULL;
VIR_STEAL_PTR(ret, vsock);
return ret;
}
void
virDomainVsockDefFree(virDomainVsockDefPtr vsock)
{
VIR_FREE(vsock);
}
void void
virDomainNetDefClear(virDomainNetDefPtr def) virDomainNetDefClear(virDomainNetDefPtr def)
{ {
......
...@@ -157,6 +157,9 @@ typedef virDomainTPMDef *virDomainTPMDefPtr; ...@@ -157,6 +157,9 @@ typedef virDomainTPMDef *virDomainTPMDefPtr;
typedef struct _virDomainIOMMUDef virDomainIOMMUDef; typedef struct _virDomainIOMMUDef virDomainIOMMUDef;
typedef virDomainIOMMUDef *virDomainIOMMUDefPtr; typedef virDomainIOMMUDef *virDomainIOMMUDefPtr;
typedef struct _virDomainVsockDef virDomainVsockDef;
typedef virDomainVsockDef *virDomainVsockDefPtr;
typedef struct _virDomainVirtioOptions virDomainVirtioOptions; typedef struct _virDomainVirtioOptions virDomainVirtioOptions;
typedef virDomainVirtioOptions *virDomainVirtioOptionsPtr; typedef virDomainVirtioOptions *virDomainVirtioOptionsPtr;
...@@ -2311,6 +2314,9 @@ struct _virDomainIOMMUDef { ...@@ -2311,6 +2314,9 @@ struct _virDomainIOMMUDef {
virTristateSwitch iotlb; virTristateSwitch iotlb;
}; };
struct _virDomainVsockDef {
};
struct _virDomainVirtioOptions { struct _virDomainVirtioOptions {
virTristateSwitch iommu; virTristateSwitch iommu;
virTristateSwitch ats; virTristateSwitch ats;
...@@ -2800,6 +2806,8 @@ bool virDomainControllerIsPSeriesPHB(const virDomainControllerDef *cont); ...@@ -2800,6 +2806,8 @@ bool virDomainControllerIsPSeriesPHB(const virDomainControllerDef *cont);
virDomainFSDefPtr virDomainFSDefNew(void); virDomainFSDefPtr virDomainFSDefNew(void);
void virDomainFSDefFree(virDomainFSDefPtr def); void virDomainFSDefFree(virDomainFSDefPtr def);
void virDomainActualNetDefFree(virDomainActualNetDefPtr def); void virDomainActualNetDefFree(virDomainActualNetDefPtr def);
virDomainVsockDefPtr virDomainVsockDefNew(virDomainXMLOptionPtr xmlopt);
void virDomainVsockDefFree(virDomainVsockDefPtr vsock);
void virDomainNetDefClear(virDomainNetDefPtr def); void virDomainNetDefClear(virDomainNetDefPtr def);
void virDomainNetDefFree(virDomainNetDefPtr def); void virDomainNetDefFree(virDomainNetDefPtr def);
void virDomainSmartcardDefFree(virDomainSmartcardDefPtr def); void virDomainSmartcardDefFree(virDomainSmartcardDefPtr def);
......
...@@ -574,6 +574,7 @@ virDomainVideoVGAConfTypeFromString; ...@@ -574,6 +574,7 @@ virDomainVideoVGAConfTypeFromString;
virDomainVideoVGAConfTypeToString; virDomainVideoVGAConfTypeToString;
virDomainVirtTypeFromString; virDomainVirtTypeFromString;
virDomainVirtTypeToString; virDomainVirtTypeToString;
virDomainVsockDefNew;
virDomainWatchdogActionTypeFromString; virDomainWatchdogActionTypeFromString;
virDomainWatchdogActionTypeToString; virDomainWatchdogActionTypeToString;
virDomainWatchdogDefFree; virDomainWatchdogDefFree;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册