Re: [vhostmd PATCH 2/3] Fix error messages in dump_virtio functions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Same comment about period at end of subject. Also, I don't think the error messages are broken, they are just being changed to include the function name. I adjusted the subject and will push this patch.

Regards,
Jim

On 2/7/19 8:41 AM, Michael Trapp wrote:
---
  libmetrics/libmetrics.c | 14 ++++++++------
  1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/libmetrics/libmetrics.c b/libmetrics/libmetrics.c
index 14da343..d79a023 100644
--- a/libmetrics/libmetrics.c
+++ b/libmetrics/libmetrics.c
@@ -797,8 +797,8 @@ static char *get_virtio_metrics(void)
      fd = open(dev, O_RDWR | O_NONBLOCK);
if (fd < 0) {
-        libmsg("Error, unable to export metrics: open(%s) %s\n",
-                dev, strerror(errno));
+        libmsg("%s(): Unable to export metrics: open(%s) %s\n",
+                __func__, dev, strerror(errno));
          goto error;
      }
@@ -859,6 +859,8 @@ static char *get_virtio_metrics(void)
      if (response)
          free(response);
+ libmsg("%s(): Unable to read metrics\n", __func__);
+
      return NULL;
  }
@@ -880,15 +882,15 @@ int dump_virtio_metrics(const char *dest_file)
      if (dest_file) {
          fp = fopen(dest_file, "w");
          if (fp == NULL) {
-            libmsg("Error, unable to dump metrics: fopen(%s) %s\n",
-                   dest_file, strerror(errno));
+            libmsg("%s(), unable to dump metrics: fopen(%s) %s\n",
+                   __func__, dest_file, strerror(errno));
              goto error;
          }
      }
if (fwrite(response, 1UL, len, fp) != len) {
-        libmsg("Error, unable to export metrics to file:%s %s\n",
-                dest_file ? dest_file : "stdout", strerror(errno));
+        libmsg("%s(), unable to export metrics to file:%s %s\n",
+                __func__, dest_file ? dest_file : "stdout", strerror(errno));
          goto error;
      }

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux