]> xenbits.xensource.com Git - libvirt.git/commitdiff
virNetDevSetVfMac: Fix error message on invalid args
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 22 Apr 2022 12:15:46 +0000 (14:15 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 5 May 2022 11:19:43 +0000 (13:19 +0200)
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 <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virnetdev.c

index 1c15a475fad2011e4ccebe7489d0a00823521742..5e60bf068f6506c4c0782abe715c6d6b0cbe721c 100644 (file)
@@ -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;
     }