Blame SOURCES/kvm-qemu-nbd-Use-program-name-in-error-messages.patch

7711c0
From 9a2c829fe94fb3bb241cf9f22cd206c4392b87f3 Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Wed, 27 Mar 2019 17:22:20 +0100
7711c0
Subject: [PATCH 081/163] qemu-nbd: Use program name in error messages
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190327172308.31077-8-jsnow@redhat.com>
7711c0
Patchwork-id: 85174
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 07/55] qemu-nbd: Use program name in error messages
7711c0
Bugzilla: 1691009
7711c0
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
RH-Acked-by: Max Reitz <mreitz@redhat.com>
7711c0
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
7711c0
From: Eric Blake <eblake@redhat.com>
7711c0
7711c0
This changes output from:
7711c0
7711c0
$ qemu-nbd nosuch
7711c0
Failed to blk_new_open 'nosuch': Could not open 'nosuch': No such file or directory
7711c0
7711c0
to something more consistent with qemu-img and qemu:
7711c0
7711c0
$ qemu-nbd nosuch
7711c0
qemu-nbd: Failed to blk_new_open 'nosuch': Could not open 'nosuch': No such file or directory
7711c0
7711c0
Update the lone affected test to match.  (Hmm - is it sad that we don't
7711c0
do much testing of expected failures?)
7711c0
7711c0
Signed-off-by: Eric Blake <eblake@redhat.com>
7711c0
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
7711c0
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
7711c0
Message-Id: <20181215135324.152629-2-eblake@redhat.com>
7711c0
(cherry picked from commit 3ba1b7baf4b2518e8efdbe50175d909b79c21596)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 qemu-nbd.c                 | 1 +
7711c0
 tests/qemu-iotests/233.out | 2 +-
7711c0
 2 files changed, 2 insertions(+), 1 deletion(-)
7711c0
7711c0
diff --git a/qemu-nbd.c b/qemu-nbd.c
7711c0
index e76fe30..7f078b2 100644
7711c0
--- a/qemu-nbd.c
7711c0
+++ b/qemu-nbd.c
7711c0
@@ -571,6 +571,7 @@ int main(int argc, char **argv)
7711c0
 #endif
7711c0
 
7711c0
     module_call_init(MODULE_INIT_TRACE);
7711c0
+    error_set_progname(argv[0]);
7711c0
     qcrypto_init(&error_fatal);
7711c0
 
7711c0
     module_call_init(MODULE_INIT_QOM);
7711c0
diff --git a/tests/qemu-iotests/233.out b/tests/qemu-iotests/233.out
7711c0
index 94acd9b..5f41672 100644
7711c0
--- a/tests/qemu-iotests/233.out
7711c0
+++ b/tests/qemu-iotests/233.out
7711c0
@@ -27,7 +27,7 @@ virtual size: 64M (67108864 bytes)
7711c0
 disk size: unavailable
7711c0
 
7711c0
 == check TLS with different CA fails ==
7711c0
-option negotiation failed: Verify failed: No certificate was found.
7711c0
+qemu-nbd: option negotiation failed: Verify failed: No certificate was found.
7711c0
 qemu-img: Could not open 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': The certificate hasn't got a known issuer
7711c0
 
7711c0
 == perform I/O over TLS ==
7711c0
-- 
7711c0
1.8.3.1
7711c0