From nobody Mon Feb 9 17:25:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1650629762; cv=none; d=zohomail.com; s=zohoarc; b=ZVVlngALEmIJWA4Kt5YiY/HOuJPRDWD+4HLJ2L7U9NttWMLAIbhM6IHMHBasx/kK/7irXlOBPtwpku+DIuAqDkgohVmke24kCGIMPZMn0RKFgjrlhItD4S7qzK59v5nZUvE6kTl7LQ9tJyT6RyP44V6eQuoQOZ0JCKQ1hLCHqpA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650629762; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mjJnmLq057yKHt6it9qq4Yw+hSl0tpBE1fcxSyj0TDc=; b=LiI7pp8JYTdu6B97oTBShUUkmTEPUhrC0MfvD22DeDYVwftpEDq7qynzwoWLFokg3TKXe/brT97kGedx8QzfTJvTmqHC/a8EnGIKQRFaf9m92ciaZYId554nlhUs1q42Fv1x6wqId60qhgi2lqkN2rEO4BWWI+2azSEMbJK1rpg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1650629762929802.1890959985467; Fri, 22 Apr 2022 05:16:02 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-150-OCJEFrsdPW6gzJkdr1NGsw-1; Fri, 22 Apr 2022 08:15:57 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DFB8E866DF8; Fri, 22 Apr 2022 12:15:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 04CB854CE33; Fri, 22 Apr 2022 12:15:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3A2C71940360; Fri, 22 Apr 2022 12:15:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DABDB1940351 for ; Fri, 22 Apr 2022 12:15:49 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CA56614A5066; Fri, 22 Apr 2022 12:15:49 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.180]) by smtp.corp.redhat.com (Postfix) with ESMTP id 72D1014A5060 for ; Fri, 22 Apr 2022 12:15:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650629761; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=mjJnmLq057yKHt6it9qq4Yw+hSl0tpBE1fcxSyj0TDc=; b=cfIKvfAae3hG5SvucqVsL9qFgOtgr9bMj2kZtBADhaAHhnoKDDI7amxc9nc0rBe+IUH2Cl jHsl4uWo26G5RtSrbho/0KWyAn8kLnzPoXVJLOaWw7ag7qw8SVs0gdM0YWxsTc3EmpmnwZ V06gOsGA6nPzs5FkCw6n4XxvnpN2YYQ= X-MC-Unique: OCJEFrsdPW6gzJkdr1NGsw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/2] virNetDevSetVfMac: Fix error message on invalid args Date: Fri, 22 Apr 2022 14:15:46 +0200 Message-Id: <6c10d3517c54ebd525fc873fb8e874e875825128.1650629734.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1650629763633100001 Content-Type: text/plain; charset="utf-8"; x-default="true" 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 --- 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, }; =20 if (macaddr =3D=3D NULL || allowRetry =3D=3D NULL) { - virReportError(EINVAL, "%s", _("Invalid parameters: %d")); + virReportError(EINVAL, + _("Invalid parameters macaddr=3D%p allowRetry=3D%p"= ), + macaddr, allowRetry); return -EINVAL; } =20 --=20 2.35.1