提交 0dde544c 编写于 作者: G Guido Günther

Introduce virDomainFSIndexByName

for containers matching virDomainDiskIndexByName.
上级 48939a4a
...@@ -11265,6 +11265,22 @@ virDomainControllerDefFormat(virBufferPtr buf, ...@@ -11265,6 +11265,22 @@ virDomainControllerDefFormat(virBufferPtr buf,
return 0; return 0;
} }
int
virDomainFSIndexByName(virDomainDefPtr def, const char *name)
{
virDomainFSDefPtr fs;
int i;
for (i = 0; i < def->nfss; i++) {
fs = def->fss[i];
if (STREQ(fs->dst, name))
return i;
}
return -1;
}
static int static int
virDomainFSDefFormat(virBufferPtr buf, virDomainFSDefFormat(virBufferPtr buf,
virDomainFSDefPtr def, virDomainFSDefPtr def,
......
...@@ -2085,6 +2085,7 @@ int virDiskNameToBusDeviceIndex(virDomainDiskDefPtr disk, ...@@ -2085,6 +2085,7 @@ int virDiskNameToBusDeviceIndex(virDomainDiskDefPtr disk,
int *devIdx); int *devIdx);
virDomainFSDefPtr virDomainGetRootFilesystem(virDomainDefPtr def); virDomainFSDefPtr virDomainGetRootFilesystem(virDomainDefPtr def);
int virDomainFSIndexByName(virDomainDefPtr def, const char *name);
int virDomainVideoDefaultType(virDomainDefPtr def); int virDomainVideoDefaultType(virDomainDefPtr def);
int virDomainVideoDefaultRAM(virDomainDefPtr def, int type); int virDomainVideoDefaultRAM(virDomainDefPtr def, int type);
......
...@@ -320,6 +320,7 @@ virDomainDiskSnapshotTypeToString; ...@@ -320,6 +320,7 @@ virDomainDiskSnapshotTypeToString;
virDomainDiskTypeFromString; virDomainDiskTypeFromString;
virDomainDiskTypeToString; virDomainDiskTypeToString;
virDomainFSDefFree; virDomainFSDefFree;
virDomainFSIndexByName;
virDomainFSTypeFromString; virDomainFSTypeFromString;
virDomainFSTypeToString; virDomainFSTypeToString;
virDomainFSWrpolicyTypeFromString; virDomainFSWrpolicyTypeFromString;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册