mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemuBuildSerialChrDeviceStr: rename cmd to buf
We usually use 'cmd' for a virCommand(Ptr) variable. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
60dfe76990
commit
82ebd144fd
@ -10867,7 +10867,7 @@ qemuBuildSerialChrDeviceStr(char **deviceStr,
|
|||||||
virDomainChrDefPtr serial,
|
virDomainChrDefPtr serial,
|
||||||
virQEMUCapsPtr qemuCaps)
|
virQEMUCapsPtr qemuCaps)
|
||||||
{
|
{
|
||||||
virBuffer cmd = VIR_BUFFER_INITIALIZER;
|
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||||
virQEMUCapsFlags caps;
|
virQEMUCapsFlags caps;
|
||||||
|
|
||||||
switch ((virDomainChrSerialTargetModel) serial->targetModel) {
|
switch ((virDomainChrSerialTargetModel) serial->targetModel) {
|
||||||
@ -10901,21 +10901,21 @@ qemuBuildSerialChrDeviceStr(char **deviceStr,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
virBufferAsprintf(&cmd, "%s,chardev=char%s,id=%s",
|
virBufferAsprintf(&buf, "%s,chardev=char%s,id=%s",
|
||||||
virDomainChrSerialTargetModelTypeToString(serial->targetModel),
|
virDomainChrSerialTargetModelTypeToString(serial->targetModel),
|
||||||
serial->info.alias, serial->info.alias);
|
serial->info.alias, serial->info.alias);
|
||||||
|
|
||||||
if (qemuBuildDeviceAddressStr(&cmd, def, &serial->info, qemuCaps) < 0)
|
if (qemuBuildDeviceAddressStr(&buf, def, &serial->info, qemuCaps) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (virBufferCheckError(&cmd) < 0)
|
if (virBufferCheckError(&buf) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
*deviceStr = virBufferContentAndReset(&cmd);
|
*deviceStr = virBufferContentAndReset(&buf);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&cmd);
|
virBufferFreeAndReset(&buf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user