mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 03:21:19 +00:00
qemuBuildChardevCommand: Remove unused 'cfg' parameter
Now that the parameter is unused we can remove it as well as from each caller that doesn't need it any more. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
7b94408db5
commit
384699b824
@ -1476,7 +1476,6 @@ qemuBuildChardevStr(const virDomainChrSourceDef *dev,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildChardevCommand(virCommand *cmd,
|
qemuBuildChardevCommand(virCommand *cmd,
|
||||||
virQEMUDriverConfig *cfg G_GNUC_UNUSED,
|
|
||||||
const virDomainChrSourceDef *dev,
|
const virDomainChrSourceDef *dev,
|
||||||
const char *charAlias,
|
const char *charAlias,
|
||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
@ -5570,14 +5569,12 @@ qemuBuildHostdevCommandLine(virCommand *cmd,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildMonitorCommandLine(virCommand *cmd,
|
qemuBuildMonitorCommandLine(virCommand *cmd,
|
||||||
virQEMUDriverConfig *cfg,
|
|
||||||
qemuDomainObjPrivate *priv)
|
qemuDomainObjPrivate *priv)
|
||||||
{
|
{
|
||||||
if (!priv->monConfig)
|
if (!priv->monConfig)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (qemuBuildChardevCommand(cmd,
|
if (qemuBuildChardevCommand(cmd,
|
||||||
cfg,
|
|
||||||
priv->monConfig,
|
priv->monConfig,
|
||||||
"charmonitor",
|
"charmonitor",
|
||||||
priv->qemuCaps) < 0)
|
priv->qemuCaps) < 0)
|
||||||
@ -5698,7 +5695,6 @@ qemuBuildSclpDevProps(virDomainChrDef *dev)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildRNGBackendChrdev(virCommand *cmd,
|
qemuBuildRNGBackendChrdev(virCommand *cmd,
|
||||||
virQEMUDriverConfig *cfg,
|
|
||||||
virDomainRNGDef *rng,
|
virDomainRNGDef *rng,
|
||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
{
|
{
|
||||||
@ -5713,7 +5709,6 @@ qemuBuildRNGBackendChrdev(virCommand *cmd,
|
|||||||
|
|
||||||
case VIR_DOMAIN_RNG_BACKEND_EGD:
|
case VIR_DOMAIN_RNG_BACKEND_EGD:
|
||||||
if (qemuBuildChardevCommand(cmd,
|
if (qemuBuildChardevCommand(cmd,
|
||||||
cfg,
|
|
||||||
rng->source.chardev,
|
rng->source.chardev,
|
||||||
charAlias,
|
charAlias,
|
||||||
qemuCaps) < 0)
|
qemuCaps) < 0)
|
||||||
@ -5805,7 +5800,6 @@ qemuBuildRNGDevProps(const virDomainDef *def,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildRNGCommandLine(virCommand *cmd,
|
qemuBuildRNGCommandLine(virCommand *cmd,
|
||||||
virQEMUDriverConfig *cfg,
|
|
||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
{
|
{
|
||||||
@ -5823,7 +5817,7 @@ qemuBuildRNGCommandLine(virCommand *cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* possibly add character device for backend */
|
/* possibly add character device for backend */
|
||||||
if (qemuBuildRNGBackendChrdev(cmd, cfg, rng, qemuCaps) < 0)
|
if (qemuBuildRNGBackendChrdev(cmd, rng, qemuCaps) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (qemuBuildRNGBackendProps(rng, &props) < 0)
|
if (qemuBuildRNGBackendProps(rng, &props) < 0)
|
||||||
@ -8645,18 +8639,15 @@ qemuBuildGraphicsCommandLine(virQEMUDriverConfig *cfg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuInterfaceVhostuserConnect(virQEMUDriver *driver,
|
qemuInterfaceVhostuserConnect(virCommand *cmd,
|
||||||
virCommand *cmd,
|
|
||||||
virDomainNetDef *net,
|
virDomainNetDef *net,
|
||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
{
|
{
|
||||||
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
|
||||||
g_autofree char *charAlias = qemuAliasChardevFromDevAlias(net->info.alias);
|
g_autofree char *charAlias = qemuAliasChardevFromDevAlias(net->info.alias);
|
||||||
|
|
||||||
switch ((virDomainChrType)net->data.vhostuser->type) {
|
switch ((virDomainChrType)net->data.vhostuser->type) {
|
||||||
case VIR_DOMAIN_CHR_TYPE_UNIX:
|
case VIR_DOMAIN_CHR_TYPE_UNIX:
|
||||||
if (qemuBuildChardevCommand(cmd,
|
if (qemuBuildChardevCommand(cmd,
|
||||||
cfg,
|
|
||||||
net->data.vhostuser,
|
net->data.vhostuser,
|
||||||
charAlias,
|
charAlias,
|
||||||
qemuCaps) < 0)
|
qemuCaps) < 0)
|
||||||
@ -8777,7 +8768,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriver *driver,
|
|||||||
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
|
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
|
||||||
requireNicdev = true;
|
requireNicdev = true;
|
||||||
|
|
||||||
if (qemuInterfaceVhostuserConnect(driver, cmd, net, qemuCaps) < 0)
|
if (qemuInterfaceVhostuserConnect(cmd, net, qemuCaps) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virNetDevOpenvswitchGetVhostuserIfname(net->data.vhostuser->data.nix.path,
|
if (virNetDevOpenvswitchGetVhostuserIfname(net->data.vhostuser->data.nix.path,
|
||||||
@ -9049,7 +9040,6 @@ qemuBuildNetCommandLine(virQEMUDriver *driver,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildSmartcardCommandLine(virCommand *cmd,
|
qemuBuildSmartcardCommandLine(virCommand *cmd,
|
||||||
virQEMUDriverConfig *cfg,
|
|
||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
{
|
{
|
||||||
@ -9095,7 +9085,6 @@ qemuBuildSmartcardCommandLine(virCommand *cmd,
|
|||||||
g_autofree char *charAlias = qemuAliasChardevFromDevAlias(smartcard->info.alias);
|
g_autofree char *charAlias = qemuAliasChardevFromDevAlias(smartcard->info.alias);
|
||||||
|
|
||||||
if (qemuBuildChardevCommand(cmd,
|
if (qemuBuildChardevCommand(cmd,
|
||||||
cfg,
|
|
||||||
smartcard->data.passthru,
|
smartcard->data.passthru,
|
||||||
charAlias,
|
charAlias,
|
||||||
qemuCaps) < 0)
|
qemuCaps) < 0)
|
||||||
@ -9241,7 +9230,6 @@ qemuBuildShmemBackendMemProps(virDomainShmemDef *shmem)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildShmemCommandLine(virCommand *cmd,
|
qemuBuildShmemCommandLine(virCommand *cmd,
|
||||||
virQEMUDriverConfig *cfg,
|
|
||||||
virDomainDef *def,
|
virDomainDef *def,
|
||||||
virDomainShmemDef *shmem,
|
virDomainShmemDef *shmem,
|
||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
@ -9309,7 +9297,6 @@ qemuBuildShmemCommandLine(virCommand *cmd,
|
|||||||
g_autofree char *charAlias = qemuAliasChardevFromDevAlias(shmem->info.alias);
|
g_autofree char *charAlias = qemuAliasChardevFromDevAlias(shmem->info.alias);
|
||||||
|
|
||||||
if (qemuBuildChardevCommand(cmd,
|
if (qemuBuildChardevCommand(cmd,
|
||||||
cfg,
|
|
||||||
shmem->server.chr,
|
shmem->server.chr,
|
||||||
charAlias,
|
charAlias,
|
||||||
qemuCaps) < 0)
|
qemuCaps) < 0)
|
||||||
@ -9406,7 +9393,6 @@ qemuChrIsPlatformDevice(const virDomainDef *def,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildSerialCommandLine(virCommand *cmd,
|
qemuBuildSerialCommandLine(virCommand *cmd,
|
||||||
virQEMUDriverConfig *cfg,
|
|
||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
{
|
{
|
||||||
@ -9428,7 +9414,6 @@ qemuBuildSerialCommandLine(virCommand *cmd,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (qemuBuildChardevCommand(cmd,
|
if (qemuBuildChardevCommand(cmd,
|
||||||
cfg,
|
|
||||||
serial->source,
|
serial->source,
|
||||||
charAlias,
|
charAlias,
|
||||||
qemuCaps) < 0)
|
qemuCaps) < 0)
|
||||||
@ -9461,7 +9446,6 @@ qemuBuildSerialCommandLine(virCommand *cmd,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildParallelsCommandLine(virCommand *cmd,
|
qemuBuildParallelsCommandLine(virCommand *cmd,
|
||||||
virQEMUDriverConfig *cfg,
|
|
||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
{
|
{
|
||||||
@ -9472,7 +9456,6 @@ qemuBuildParallelsCommandLine(virCommand *cmd,
|
|||||||
g_autofree char *charAlias = qemuAliasChardevFromDevAlias(parallel->info.alias);
|
g_autofree char *charAlias = qemuAliasChardevFromDevAlias(parallel->info.alias);
|
||||||
|
|
||||||
if (qemuBuildChardevCommand(cmd,
|
if (qemuBuildChardevCommand(cmd,
|
||||||
cfg,
|
|
||||||
parallel->source,
|
parallel->source,
|
||||||
charAlias,
|
charAlias,
|
||||||
qemuCaps) < 0)
|
qemuCaps) < 0)
|
||||||
@ -9489,7 +9472,6 @@ qemuBuildParallelsCommandLine(virCommand *cmd,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildChannelsCommandLine(virCommand *cmd,
|
qemuBuildChannelsCommandLine(virCommand *cmd,
|
||||||
virQEMUDriverConfig *cfg,
|
|
||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
{
|
{
|
||||||
@ -9501,7 +9483,6 @@ qemuBuildChannelsCommandLine(virCommand *cmd,
|
|||||||
g_autofree char *charAlias = qemuAliasChardevFromDevAlias(channel->info.alias);
|
g_autofree char *charAlias = qemuAliasChardevFromDevAlias(channel->info.alias);
|
||||||
|
|
||||||
if (qemuBuildChardevCommand(cmd,
|
if (qemuBuildChardevCommand(cmd,
|
||||||
cfg,
|
|
||||||
channel->source,
|
channel->source,
|
||||||
charAlias,
|
charAlias,
|
||||||
qemuCaps) < 0)
|
qemuCaps) < 0)
|
||||||
@ -9534,7 +9515,6 @@ qemuBuildChannelsCommandLine(virCommand *cmd,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildConsoleCommandLine(virCommand *cmd,
|
qemuBuildConsoleCommandLine(virCommand *cmd,
|
||||||
virQEMUDriverConfig *cfg,
|
|
||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
{
|
{
|
||||||
@ -9550,7 +9530,6 @@ qemuBuildConsoleCommandLine(virCommand *cmd,
|
|||||||
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM:
|
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM:
|
||||||
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO:
|
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO:
|
||||||
if (qemuBuildChardevCommand(cmd,
|
if (qemuBuildChardevCommand(cmd,
|
||||||
cfg,
|
|
||||||
console->source,
|
console->source,
|
||||||
charAlias,
|
charAlias,
|
||||||
qemuCaps) < 0)
|
qemuCaps) < 0)
|
||||||
@ -9632,7 +9611,6 @@ qemuBuildRedirdevDevProps(const virDomainDef *def,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildRedirdevCommandLine(virCommand *cmd,
|
qemuBuildRedirdevCommandLine(virCommand *cmd,
|
||||||
virQEMUDriverConfig *cfg,
|
|
||||||
const virDomainDef *def,
|
const virDomainDef *def,
|
||||||
virQEMUCaps *qemuCaps)
|
virQEMUCaps *qemuCaps)
|
||||||
{
|
{
|
||||||
@ -9644,7 +9622,6 @@ qemuBuildRedirdevCommandLine(virCommand *cmd,
|
|||||||
g_autofree char *charAlias = qemuAliasChardevFromDevAlias(redirdev->info.alias);
|
g_autofree char *charAlias = qemuAliasChardevFromDevAlias(redirdev->info.alias);
|
||||||
|
|
||||||
if (qemuBuildChardevCommand(cmd,
|
if (qemuBuildChardevCommand(cmd,
|
||||||
cfg,
|
|
||||||
redirdev->source,
|
redirdev->source,
|
||||||
charAlias,
|
charAlias,
|
||||||
qemuCaps) < 0)
|
qemuCaps) < 0)
|
||||||
@ -10614,7 +10591,7 @@ qemuBuildCommandLine(virQEMUDriver *driver,
|
|||||||
virCommandAddArg(cmd, "-no-user-config");
|
virCommandAddArg(cmd, "-no-user-config");
|
||||||
virCommandAddArg(cmd, "-nodefaults");
|
virCommandAddArg(cmd, "-nodefaults");
|
||||||
|
|
||||||
if (qemuBuildMonitorCommandLine(cmd, cfg, priv) < 0)
|
if (qemuBuildMonitorCommandLine(cmd, priv) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (qemuBuildClockCommandLine(cmd, def, qemuCaps) < 0)
|
if (qemuBuildClockCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
@ -10653,19 +10630,19 @@ qemuBuildCommandLine(virQEMUDriver *driver,
|
|||||||
nnicindexes, nicindexes) < 0)
|
nnicindexes, nicindexes) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (qemuBuildSmartcardCommandLine(cmd, cfg, def, qemuCaps) < 0)
|
if (qemuBuildSmartcardCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (qemuBuildSerialCommandLine(cmd, cfg, def, qemuCaps) < 0)
|
if (qemuBuildSerialCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (qemuBuildParallelsCommandLine(cmd, cfg, def, qemuCaps) < 0)
|
if (qemuBuildParallelsCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (qemuBuildChannelsCommandLine(cmd, cfg, def, qemuCaps) < 0)
|
if (qemuBuildChannelsCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (qemuBuildConsoleCommandLine(cmd, cfg, def, qemuCaps) < 0)
|
if (qemuBuildConsoleCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (qemuBuildTPMsCommandLine(cmd, def, qemuCaps) < 0)
|
if (qemuBuildTPMsCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
@ -10689,7 +10666,7 @@ qemuBuildCommandLine(virQEMUDriver *driver,
|
|||||||
if (qemuBuildWatchdogCommandLine(cmd, def, qemuCaps) < 0)
|
if (qemuBuildWatchdogCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (qemuBuildRedirdevCommandLine(cmd, cfg, def, qemuCaps) < 0)
|
if (qemuBuildRedirdevCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (qemuBuildHostdevCommandLine(cmd, def, qemuCaps) < 0)
|
if (qemuBuildHostdevCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
@ -10701,7 +10678,7 @@ qemuBuildCommandLine(virQEMUDriver *driver,
|
|||||||
if (qemuBuildMemballoonCommandLine(cmd, def, qemuCaps) < 0)
|
if (qemuBuildMemballoonCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (qemuBuildRNGCommandLine(cmd, cfg, def, qemuCaps) < 0)
|
if (qemuBuildRNGCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (qemuBuildNVRAMCommandLine(cmd, def) < 0)
|
if (qemuBuildNVRAMCommandLine(cmd, def) < 0)
|
||||||
@ -10735,7 +10712,7 @@ qemuBuildCommandLine(virQEMUDriver *driver,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (i = 0; i < def->nshmems; i++) {
|
for (i = 0; i < def->nshmems; i++) {
|
||||||
if (qemuBuildShmemCommandLine(cmd, cfg, def, def->shmems[i], qemuCaps) < 0)
|
if (qemuBuildShmemCommandLine(cmd, def, def->shmems[i], qemuCaps) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user