mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Introduce virDomainChrSourceDefNew for virDomainChrDefPtr
Change the virDomainChrDef to use a pointer to 'source' and allocate that pointer during virDomainChrDefNew. This has tremendous "fallout" in the rest of the code which mainly has to change source.$field to source->$field. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
@@ -202,17 +202,17 @@ testSELinuxLoadDef(const char *testname)
|
||||
}
|
||||
|
||||
for (i = 0; i < def->nserials; i++) {
|
||||
if (def->serials[i]->source.type != VIR_DOMAIN_CHR_TYPE_FILE &&
|
||||
def->serials[i]->source.type != VIR_DOMAIN_CHR_TYPE_PIPE &&
|
||||
def->serials[i]->source.type != VIR_DOMAIN_CHR_TYPE_DEV &&
|
||||
def->serials[i]->source.type != VIR_DOMAIN_CHR_TYPE_UNIX)
|
||||
if (def->serials[i]->source->type != VIR_DOMAIN_CHR_TYPE_FILE &&
|
||||
def->serials[i]->source->type != VIR_DOMAIN_CHR_TYPE_PIPE &&
|
||||
def->serials[i]->source->type != VIR_DOMAIN_CHR_TYPE_DEV &&
|
||||
def->serials[i]->source->type != VIR_DOMAIN_CHR_TYPE_UNIX)
|
||||
continue;
|
||||
|
||||
if (def->serials[i]->source.type == VIR_DOMAIN_CHR_TYPE_UNIX) {
|
||||
if (testSELinuxMungePath(&def->serials[i]->source.data.nix.path) < 0)
|
||||
if (def->serials[i]->source->type == VIR_DOMAIN_CHR_TYPE_UNIX) {
|
||||
if (testSELinuxMungePath(&def->serials[i]->source->data.nix.path) < 0)
|
||||
goto cleanup;
|
||||
} else {
|
||||
if (testSELinuxMungePath(&def->serials[i]->source.data.file.path) < 0)
|
||||
if (testSELinuxMungePath(&def->serials[i]->source->data.file.path) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user