- Fix actions using the 'free' command - Fix buffer accounting when generating metric XML - Fix warning with gcc >= 13 - Fix implicit declarations - Change actions to retrieve vendor and product info - Add a 'unit' attribute to the metrics element - vif-stats.py: convert to Python3 - Misc coverity fixes - Relax virtio requirement in config file - Drop relax-virtio-config-requirement.patch - Add service file OBS-URL: https://build.opensuse.org/package/show/Virtualization/vhostmd?expand=0&rev=55
18 lines
456 B
Diff
18 lines
456 B
Diff
Index: vhostmd-1.2/vhostmd/metric.c
|
|
===================================================================
|
|
--- vhostmd-1.2.orig/vhostmd/metric.c
|
|
+++ vhostmd-1.2/vhostmd/metric.c
|
|
@@ -280,6 +280,12 @@ int metric_value_get(metric *m)
|
|
goto out;
|
|
|
|
fread(m->value, 1, len-1, fp);
|
|
+
|
|
+ if (m->type != M_XML) {
|
|
+ size_t end = strlen(m->value) - 1;
|
|
+ if (m->value[end] == '\n')
|
|
+ m->value[end] = '\0';
|
|
+ }
|
|
|
|
out:
|
|
ret = pclose(fp);
|