Introduce virDomainFSIndexByName

for containers matching virDomainDiskIndexByName.
This commit is contained in:
Guido Günther 2012-05-29 20:46:38 +02:00
parent 48939a4aba
commit 0dde544c95
3 changed files with 18 additions and 0 deletions

View File

@ -11265,6 +11265,22 @@ virDomainControllerDefFormat(virBufferPtr buf,
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
virDomainFSDefFormat(virBufferPtr buf,
virDomainFSDefPtr def,

View File

@ -2085,6 +2085,7 @@ int virDiskNameToBusDeviceIndex(virDomainDiskDefPtr disk,
int *devIdx);
virDomainFSDefPtr virDomainGetRootFilesystem(virDomainDefPtr def);
int virDomainFSIndexByName(virDomainDefPtr def, const char *name);
int virDomainVideoDefaultType(virDomainDefPtr def);
int virDomainVideoDefaultRAM(virDomainDefPtr def, int type);

View File

@ -320,6 +320,7 @@ virDomainDiskSnapshotTypeToString;
virDomainDiskTypeFromString;
virDomainDiskTypeToString;
virDomainFSDefFree;
virDomainFSIndexByName;
virDomainFSTypeFromString;
virDomainFSTypeToString;
virDomainFSWrpolicyTypeFromString;