From 7899a115237e0490e5c85c11b7a6d1d4007c7472 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Fri, 22 Apr 2022 14:15:46 +0200 Subject: [PATCH] virNetDevSetVfMac: Fix error message on invalid args MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If virNetDevSetVfMac() is called with either @macaddr or @allowRetry arguments NULL an error is reported, because this is considered invalid use. However, the error message is not informative as it could be. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- src/util/virnetdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 1c15a475fa..5e60bf068f 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -1642,7 +1642,9 @@ virNetDevSetVfMac(const char *ifname, int vf, }; if (macaddr == NULL || allowRetry == NULL) { - virReportError(EINVAL, "%s", _("Invalid parameters: %d")); + virReportError(EINVAL, + _("Invalid parameters macaddr=%p allowRetry=%p"), + macaddr, allowRetry); return -EINVAL; }