qemu: Introduce qemuDomainHostdevPrivatePtr

Modeled after the qemuDomainDiskPrivatePtr logic, create a privateData
pointer in the _virDomainHostdevDef to allow storage of private data
for a hypervisor in order to at least temporarily store auth/secrets
data for usage during qemuBuildCommandLine.

NB: Since the qemu_parse_command (qemuParseCommandLine) code is not
expecting to restore the auth/secret data, there's no need to add
code to handle this new structure there.

Updated copyrights for modules touched. Some didn't have updates in a
couple years even though changes have been made.

Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
John Ferlan
2016-04-06 09:46:49 -04:00
parent 40d8e2ba37
commit 27726d8c21
10 changed files with 99 additions and 19 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright (C) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
* Copyright (C) 2014-2016 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -86,7 +87,7 @@ myInit(void)
for (i = 0; i < nhostdevs; i++) {
virDomainHostdevSubsys subsys;
hostdevs[i] = virDomainHostdevDefAlloc();
hostdevs[i] = virDomainHostdevDefAlloc(NULL);
if (!hostdevs[i])
goto cleanup;
hostdevs[i]->mode = VIR_DOMAIN_HOSTDEV_MODE_SUBSYS;