mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
Introduce virDomainFSIndexByName
for containers matching virDomainDiskIndexByName.
This commit is contained in:
parent
48939a4aba
commit
0dde544c95
@ -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,
|
||||
|
@ -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);
|
||||
|
||||
|
@ -320,6 +320,7 @@ virDomainDiskSnapshotTypeToString;
|
||||
virDomainDiskTypeFromString;
|
||||
virDomainDiskTypeToString;
|
||||
virDomainFSDefFree;
|
||||
virDomainFSIndexByName;
|
||||
virDomainFSTypeFromString;
|
||||
virDomainFSTypeToString;
|
||||
virDomainFSWrpolicyTypeFromString;
|
||||
|
Loading…
Reference in New Issue
Block a user