ERROR(PLUGIN_NAME " plugin: virDomainListGetStats failed with status %i.",
status);
- virErrorPtr err = virConnGetLastError(conn);
+ virErrorPtr err = virGetLastError();
if (err->code == VIR_ERR_NO_SUPPORT) {
ERROR(PLUGIN_NAME
" plugin: Disabled unsupported ExtraStats selector: perf");
ERROR(PLUGIN_NAME " plugin: virDomainGetVcpus failed with status %i.",
status);
- virErrorPtr err = virConnGetLastError(conn);
+ virErrorPtr err = virGetLastError();
if (err->code == VIR_ERR_NO_SUPPORT) {
if (extra_stats & ex_stats_vcpu)
ERROR(PLUGIN_NAME
if (nparams < 0) {
VIRT_ERROR(conn, "getting the CPU params count");
- virErrorPtr err = virConnGetLastError(conn);
+ virErrorPtr err = virGetLastError();
if (err->code == VIR_ERR_NO_SUPPORT) {
ERROR(PLUGIN_NAME
" plugin: Disabled unsupported ExtraStats selector: pcpu");
mem_stats);
sfree(minfo);
- virErrorPtr err = virConnGetLastError(conn);
+ virErrorPtr err = virGetLastError();
if (err->code == VIR_ERR_NO_SUPPORT) {
ERROR(PLUGIN_NAME
" plugin: Disabled unsupported ExtraStats selector: memory");
ERROR(PLUGIN_NAME
" plugin: failed to get preferred size of disk errors array");
- virErrorPtr err = virConnGetLastError(conn);
+ virErrorPtr err = virGetLastError();
if (err->code == VIR_ERR_NO_SUPPORT) {
ERROR(PLUGIN_NAME
ERROR(PLUGIN_NAME " plugin: virDomainGetBlockInfo failed for path: %s",
block_dev->path);
- virErrorPtr err = virConnGetLastError(conn);
+ virErrorPtr err = virGetLastError();
if (err->code == VIR_ERR_NO_SUPPORT) {
if (extra_stats & ex_stats_disk_allocation)
ERROR(PLUGIN_NAME " plugin: virDomainGetFSInfo failed: %d",
mount_points_cnt);
- virErrorPtr err = virConnGetLastError(conn);
+ virErrorPtr err = virGetLastError();
if (err->code == VIR_ERR_NO_SUPPORT) {
ERROR(PLUGIN_NAME
" plugin: Disabled unsupported ExtraStats selector: fs_info");
if (ret != 0) {
ERROR(PLUGIN_NAME " plugin: virDomainGetJobStats failed: %d", ret);
- virErrorPtr err = virConnGetLastError(conn);
+ virErrorPtr err = virGetLastError();
// VIR_ERR_INVALID_ARG returned when VIR_DOMAIN_JOB_STATS_COMPLETED flag is
// not supported by driver
if (err->code == VIR_ERR_NO_SUPPORT || err->code == VIR_ERR_INVALID_ARG) {