mirror of https://gitee.com/openkylin/libvirt.git
qemu: command: Don't bother reporting errors in smbios formatters
qemuBuildSmbiosBiosStr and qemuBuildSmbiosSystemStr return NULL if there's nothing to format on the commandline. Reporting errors from buffer creation doesn't make sense since it would be ignored.
This commit is contained in:
parent
8d67e2849e
commit
ec45439512
|
@ -5633,14 +5633,7 @@ qemuBuildSmbiosBiosStr(virSysinfoBIOSDefPtr def)
|
|||
if (def->release)
|
||||
virBufferAsprintf(&buf, ",release=%s", def->release);
|
||||
|
||||
if (virBufferCheckError(&buf) < 0)
|
||||
goto error;
|
||||
|
||||
return virBufferContentAndReset(&buf);
|
||||
|
||||
error:
|
||||
virBufferFreeAndReset(&buf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -5681,14 +5674,7 @@ qemuBuildSmbiosSystemStr(virSysinfoSystemDefPtr def,
|
|||
if (def->family)
|
||||
virBufferAsprintf(&buf, ",family=%s", def->family);
|
||||
|
||||
if (virBufferCheckError(&buf) < 0)
|
||||
goto error;
|
||||
|
||||
return virBufferContentAndReset(&buf);
|
||||
|
||||
error:
|
||||
virBufferFreeAndReset(&buf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue