From nobody Tue Feb 10 04:03:19 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1618346463; cv=none; d=zohomail.com; s=zohoarc; b=gdWxMBQsORnt2gsudFYWiP8RjsCUXrHjsvTAfYqBzUwsDBRQuPRsNvSnwXACONF1FEdPCTaRBV8OW8TE+idSrs22329D7ma974imqwSx9NZpGWBImBlbfvxwqn5fDlySE5QCLcnAU0V8mzV0VU/ECLnPsozSQqiyoJ0hneN0Dys= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618346463; 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=7IrQLZdh80TowFSSoksIlgK/0eB2e8VpDkXc+AOkMeY=; b=MJqI4CDEpvybLUJL5DIrhcVpTf4Je2xBK+z1898ro2yMq/QWbiQM9bAQPI4YnH7533xUGoNyfPZ64clS0Oy9P8RhCmRM8H42a8lshP9fhhvgWb5MyIccYhGkmO//pTdW70o+x0A+y8M6yaAXU0/G286Pu893D5xDQeqYVEtZYBY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1618346463558191.0023369528883; Tue, 13 Apr 2021 13:41:03 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-585-Xxk_kMFTNWOUWE2SpUF4AA-1; Tue, 13 Apr 2021 16:40:21 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D658010053EC; Tue, 13 Apr 2021 20:40:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B434660C04; Tue, 13 Apr 2021 20:40:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 797BF44A6E; Tue, 13 Apr 2021 20:40:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13DKds4O011690 for ; Tue, 13 Apr 2021 16:39:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id B42AA19744; Tue, 13 Apr 2021 20:39:54 +0000 (UTC) Received: from himantopus.redhat.com (ovpn-113-166.phx2.redhat.com [10.3.113.166]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 82EEF1972B for ; Tue, 13 Apr 2021 20:39:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618346462; 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=7IrQLZdh80TowFSSoksIlgK/0eB2e8VpDkXc+AOkMeY=; b=GN0RoV2ta3MDJoNnfpU9iWEd4qs28GKMfu/TQQYq97JehE+mJiO4+tx7YAezu/AvrRdlss NnS3clwfipw13A7s/5h/ZJloofMebmVFG6+bRt8Vuvz3NVM73jmQOZglsU2zbHEEc4Bvgs OhJ4IwA8NtF47HNL/5DxocNii7E92MU= X-MC-Unique: Xxk_kMFTNWOUWE2SpUF4AA-1 From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH v2 05/12] nodedev: Switch to using long options for mdevctl Date: Tue, 13 Apr 2021 15:39:41 -0500 Message-Id: <20210413203948.71864-6-jjongsma@redhat.com> In-Reply-To: <20210413203948.71864-1-jjongsma@redhat.com> References: <20210413203948.71864-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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) Content-Type: text/plain; charset="utf-8" rather than using short opentions (e.g. "-p 0000:00:02.0"), use long options everywhere (e.g. "--parent=3D0000:00:02.0") Signed-off-by: Jonathon Jongsma Reviewed-by: Laine Stump --- src/node_device/node_device_driver.c | 28 ++++++------------- ...19_36ea_4111_8f0a_8c9a70e21366-create.argv | 4 +-- ...19_36ea_4111_8f0a_8c9a70e21366-define.argv | 4 +-- ...39_495e_4243_ad9f_beb3f14c23d9-create.argv | 4 +-- ...39_495e_4243_ad9f_beb3f14c23d9-define.argv | 4 +-- ...16_1ca8_49ac_b176_871d16c13076-create.argv | 4 +-- ...16_1ca8_49ac_b176_871d16c13076-define.argv | 4 +-- tests/nodedevmdevctldata/mdevctl-start.argv | 2 +- tests/nodedevmdevctldata/mdevctl-stop.argv | 2 +- .../nodedevmdevctldata/mdevctl-undefine.argv | 2 +- 10 files changed, 24 insertions(+), 34 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index dda118b0e5..56cbae0037 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -720,10 +720,9 @@ nodeDeviceGetMdevctlDefineCreateCommand(virNodeDeviceD= ef *def, return NULL; } =20 - cmd =3D virCommandNewArgList(MDEVCTL, subcommand, - "-p", parent_addr, - "--jsonfile", "/dev/stdin", - NULL); + cmd =3D virCommandNewArgList(MDEVCTL, subcommand, NULL); + virCommandAddArgPair(cmd, "--parent", parent_addr); + virCommandAddArgPair(cmd, "--jsonfile", "/dev/stdin"); =20 virCommandSetInputBuffer(cmd, json); =20 @@ -887,11 +886,8 @@ nodeDeviceCreateXML(virConnectPtr conn, virCommand * nodeDeviceGetMdevctlStopCommand(const char *uuid, char **errmsg) { - virCommand *cmd =3D virCommandNewArgList(MDEVCTL, - "stop", - "-u", - uuid, - NULL); + virCommand *cmd =3D virCommandNewArgList(MDEVCTL, "stop", NULL); + virCommandAddArgPair(cmd, "--uuid", uuid); virCommandSetErrorBuffer(cmd, errmsg); return cmd; =20 @@ -900,11 +896,8 @@ nodeDeviceGetMdevctlStopCommand(const char *uuid, char= **errmsg) virCommand * nodeDeviceGetMdevctlUndefineCommand(const char *uuid, char **errmsg) { - virCommand *cmd =3D virCommandNewArgList(MDEVCTL, - "undefine", - "-u", - uuid, - NULL); + virCommand *cmd =3D virCommandNewArgList(MDEVCTL, "undefine", NULL); + virCommandAddArgPair(cmd, "--uuid", uuid); virCommandSetErrorBuffer(cmd, errmsg); return cmd; } @@ -912,11 +905,8 @@ nodeDeviceGetMdevctlUndefineCommand(const char *uuid, = char **errmsg) virCommand * nodeDeviceGetMdevctlStartCommand(const char *uuid, char **errmsg) { - virCommand *cmd =3D virCommandNewArgList(MDEVCTL, - "start", - "-u", - uuid, - NULL); + virCommand *cmd =3D virCommandNewArgList(MDEVCTL, "start", NULL); + virCommandAddArgPair(cmd, "--uuid", uuid); virCommandSetErrorBuffer(cmd, errmsg); return cmd; } diff --git a/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e2= 1366-create.argv b/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c= 9a70e21366-create.argv index 73a8046d84..3cf66f8a91 100644 --- a/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-cr= eate.argv +++ b/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-cr= eate.argv @@ -1,5 +1,5 @@ mdevctl \ start \ --p 0000:00:02.0 \ ---jsonfile /dev/stdin \ +--parent=3D0000:00:02.0 \ +--jsonfile=3D/dev/stdin \ --uuid=3Dd069d019-36ea-4111-8f0a-8c9a70e21366 diff --git a/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e2= 1366-define.argv b/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c= 9a70e21366-define.argv index b8bb276f9f..a8c2feaed4 100644 --- a/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-de= fine.argv +++ b/tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-de= fine.argv @@ -1,5 +1,5 @@ mdevctl \ define \ --p 0000:00:02.0 \ ---jsonfile /dev/stdin \ +--parent=3D0000:00:02.0 \ +--jsonfile=3D/dev/stdin \ --uuid=3Dd069d019-36ea-4111-8f0a-8c9a70e21366 diff --git a/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c= 23d9-create.argv b/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_be= b3f14c23d9-create.argv index eae63f7a7f..010e562026 100644 --- a/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-cr= eate.argv +++ b/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-cr= eate.argv @@ -1,4 +1,4 @@ mdevctl \ start \ --p 0000:00:02.0 \ ---jsonfile /dev/stdin +--parent=3D0000:00:02.0 \ +--jsonfile=3D/dev/stdin diff --git a/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c= 23d9-define.argv b/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_be= b3f14c23d9-define.argv index bf8637ed57..46d1e95f15 100644 --- a/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-de= fine.argv +++ b/tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-de= fine.argv @@ -1,4 +1,4 @@ mdevctl \ define \ --p 0000:00:02.0 \ ---jsonfile /dev/stdin +--parent=3D0000:00:02.0 \ +--jsonfile=3D/dev/stdin diff --git a/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c1= 3076-create.argv b/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_87= 1d16c13076-create.argv index eae63f7a7f..010e562026 100644 --- a/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-cr= eate.argv +++ b/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-cr= eate.argv @@ -1,4 +1,4 @@ mdevctl \ start \ --p 0000:00:02.0 \ ---jsonfile /dev/stdin +--parent=3D0000:00:02.0 \ +--jsonfile=3D/dev/stdin diff --git a/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c1= 3076-define.argv b/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_87= 1d16c13076-define.argv index bf8637ed57..46d1e95f15 100644 --- a/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-de= fine.argv +++ b/tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-de= fine.argv @@ -1,4 +1,4 @@ mdevctl \ define \ --p 0000:00:02.0 \ ---jsonfile /dev/stdin +--parent=3D0000:00:02.0 \ +--jsonfile=3D/dev/stdin diff --git a/tests/nodedevmdevctldata/mdevctl-start.argv b/tests/nodedevmde= vctldata/mdevctl-start.argv index ccb8e2992c..e876d08ad3 100644 --- a/tests/nodedevmdevctldata/mdevctl-start.argv +++ b/tests/nodedevmdevctldata/mdevctl-start.argv @@ -1,3 +1,3 @@ mdevctl \ start \ --u d069d019-36ea-4111-8f0a-8c9a70e21366 +--uuid=3Dd069d019-36ea-4111-8f0a-8c9a70e21366 diff --git a/tests/nodedevmdevctldata/mdevctl-stop.argv b/tests/nodedevmdev= ctldata/mdevctl-stop.argv index a07d339e47..e422b2c3ea 100644 --- a/tests/nodedevmdevctldata/mdevctl-stop.argv +++ b/tests/nodedevmdevctldata/mdevctl-stop.argv @@ -1,3 +1,3 @@ mdevctl \ stop \ --u d069d019-36ea-4111-8f0a-8c9a70e21366 +--uuid=3Dd069d019-36ea-4111-8f0a-8c9a70e21366 diff --git a/tests/nodedevmdevctldata/mdevctl-undefine.argv b/tests/nodedev= mdevctldata/mdevctl-undefine.argv index dbde32e2a8..fa35a646be 100644 --- a/tests/nodedevmdevctldata/mdevctl-undefine.argv +++ b/tests/nodedevmdevctldata/mdevctl-undefine.argv @@ -1,3 +1,3 @@ mdevctl \ undefine \ --u d069d019-36ea-4111-8f0a-8c9a70e21366 +--uuid=3Dd069d019-36ea-4111-8f0a-8c9a70e21366 --=20 2.26.3