diff mbox series

kvm-all: Add/update fprintf's for kvm_*_ioeventfd_del

Message ID 20190607090830.18807-1-yury-kotov@yandex-team.ru (mailing list archive)
State New, archived
Headers show
Series kvm-all: Add/update fprintf's for kvm_*_ioeventfd_del | expand

Commit Message

Yury Kotov June 7, 2019, 9:08 a.m. UTC
Signed-off-by: Yury Kotov <yury-kotov@yandex-team.ru>
---
 accel/kvm/kvm-all.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Comments

Paolo Bonzini June 7, 2019, 11:46 a.m. UTC | #1
On 07/06/19 11:08, Yury Kotov wrote:
> Signed-off-by: Yury Kotov <yury-kotov@yandex-team.ru>
> ---
>  accel/kvm/kvm-all.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
> index 524c4ddfbd..e4ac3386cb 100644
> --- a/accel/kvm/kvm-all.c
> +++ b/accel/kvm/kvm-all.c
> @@ -864,8 +864,8 @@ static void kvm_mem_ioeventfd_add(MemoryListener *listener,
>                                 data, true, int128_get64(section->size),
>                                 match_data);
>      if (r < 0) {
> -        fprintf(stderr, "%s: error adding ioeventfd: %s\n",
> -                __func__, strerror(-r));
> +        fprintf(stderr, "%s: error adding ioeventfd: %s (%d)\n",
> +                __func__, strerror(-r), -r);
>          abort();
>      }
>  }
> @@ -882,6 +882,8 @@ static void kvm_mem_ioeventfd_del(MemoryListener *listener,
>                                 data, false, int128_get64(section->size),
>                                 match_data);
>      if (r < 0) {
> +        fprintf(stderr, "%s: error deleting ioeventfd: %s (%d)\n",
> +                __func__, strerror(-r), -r);
>          abort();
>      }
>  }
> @@ -898,8 +900,8 @@ static void kvm_io_ioeventfd_add(MemoryListener *listener,
>                                data, true, int128_get64(section->size),
>                                match_data);
>      if (r < 0) {
> -        fprintf(stderr, "%s: error adding ioeventfd: %s\n",
> -                __func__, strerror(-r));
> +        fprintf(stderr, "%s: error adding ioeventfd: %s (%d)\n",
> +                __func__, strerror(-r), -r);
>          abort();
>      }
>  }
> @@ -917,6 +919,8 @@ static void kvm_io_ioeventfd_del(MemoryListener *listener,
>                                data, false, int128_get64(section->size),
>                                match_data);
>      if (r < 0) {
> +        fprintf(stderr, "%s: error deleting ioeventfd: %s (%d)\n",
> +                __func__, strerror(-r), -r);
>          abort();
>      }
>  }
> 

Queued, thanks.

Paolo
diff mbox series

Patch

diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 524c4ddfbd..e4ac3386cb 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -864,8 +864,8 @@  static void kvm_mem_ioeventfd_add(MemoryListener *listener,
                                data, true, int128_get64(section->size),
                                match_data);
     if (r < 0) {
-        fprintf(stderr, "%s: error adding ioeventfd: %s\n",
-                __func__, strerror(-r));
+        fprintf(stderr, "%s: error adding ioeventfd: %s (%d)\n",
+                __func__, strerror(-r), -r);
         abort();
     }
 }
@@ -882,6 +882,8 @@  static void kvm_mem_ioeventfd_del(MemoryListener *listener,
                                data, false, int128_get64(section->size),
                                match_data);
     if (r < 0) {
+        fprintf(stderr, "%s: error deleting ioeventfd: %s (%d)\n",
+                __func__, strerror(-r), -r);
         abort();
     }
 }
@@ -898,8 +900,8 @@  static void kvm_io_ioeventfd_add(MemoryListener *listener,
                               data, true, int128_get64(section->size),
                               match_data);
     if (r < 0) {
-        fprintf(stderr, "%s: error adding ioeventfd: %s\n",
-                __func__, strerror(-r));
+        fprintf(stderr, "%s: error adding ioeventfd: %s (%d)\n",
+                __func__, strerror(-r), -r);
         abort();
     }
 }
@@ -917,6 +919,8 @@  static void kvm_io_ioeventfd_del(MemoryListener *listener,
                               data, false, int128_get64(section->size),
                               match_data);
     if (r < 0) {
+        fprintf(stderr, "%s: error deleting ioeventfd: %s (%d)\n",
+                __func__, strerror(-r), -r);
         abort();
     }
 }