From nobody Tue Feb 10 09:24:23 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=1618004033; cv=none; d=zohomail.com; s=zohoarc; b=XqXa6UK+uuW57P555kOAZzbdFdHHSIvG6GP4JcibSU+1qll8mV2CeibFPFdR1Yqgs0KQwrnnN55ppAAxsggz6LBcC+sLGonjWwXWsKhF3xgTGn6F1b9EP3oBwaRb3XupvCuCE9fVlqambz+VfM4bL+EMNAH1OyzOLtwat1xPRdM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618004033; 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=ubk4Ehu29MhB8T5ypV9Rvh/2kFeJLOihIrbN2+FIhU8=; b=HnWSW+cSvQBp0hMwVJDVdXAvhk+ODjCEQIvj9+yi+GbQUxcuknF0tLWzYHb6VQzDmSVJbWLgh8nYXSPelHAd4gu/Tfm3vc9Z0CnegOiB1TRq5bneiz7nZ6pk9twrzAkscISSrgd6ofI3pX6LsoFxaX/nB53URg6VnRUx617NXz8= 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 1618004033067124.78999067409927; Fri, 9 Apr 2021 14:33:53 -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-247-5MBdz07bN7CzHNqJINvufQ-1; Fri, 09 Apr 2021 17:33:49 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 01A6D10054F6; Fri, 9 Apr 2021 21:33:43 +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 CF25F5B4BD; Fri, 9 Apr 2021 21:33:42 +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 97CE755354; Fri, 9 Apr 2021 21:33:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 139LXDxB032623 for ; Fri, 9 Apr 2021 17:33:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 587C25D6AD; Fri, 9 Apr 2021 21:33:13 +0000 (UTC) Received: from himantopus.redhat.com (ovpn-113-25.phx2.redhat.com [10.3.113.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B5145D6A1 for ; Fri, 9 Apr 2021 21:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618004032; 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=ubk4Ehu29MhB8T5ypV9Rvh/2kFeJLOihIrbN2+FIhU8=; b=ISHUIPh8rlVznxMuu7Sj4GTNaZor7rhwyniifTllPVcziYZuOAyqSeMaG0lQ9ZMXwHTYtV RlzRASQU2nC409CX9qkZ+lVgoDcGRe3sZ1vfZLHOZ+9iiWSDmUjPvRJLsAqd0rlPt+yw8o VSWKTWJ6thjj935FMEh19mAKHgWdPKI= X-MC-Unique: 5MBdz07bN7CzHNqJINvufQ-1 From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH 05/11] nodedev: Switch to using long options for mdevctl Date: Fri, 9 Apr 2021 16:33:00 -0500 Message-Id: <20210409213306.3971286-6-jjongsma@redhat.com> In-Reply-To: <20210409213306.3971286-1-jjongsma@redhat.com> References: <20210409213306.3971286-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.11 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 --- src/node_device/node_device_driver.c | 28 ++++++------------- ...19_36ea_4111_8f0a_8c9a70e21366-create.argv | 2 +- ...19_36ea_4111_8f0a_8c9a70e21366-define.argv | 2 +- ...39_495e_4243_ad9f_beb3f14c23d9-create.argv | 2 +- ...39_495e_4243_ad9f_beb3f14c23d9-define.argv | 2 +- ...16_1ca8_49ac_b176_871d16c13076-create.argv | 2 +- ...16_1ca8_49ac_b176_871d16c13076-define.argv | 2 +- tests/nodedevmdevctldata/mdevctl-start.argv | 2 +- tests/nodedevmdevctldata/mdevctl-stop.argv | 2 +- .../nodedevmdevctldata/mdevctl-undefine.argv | 2 +- 10 files changed, 18 insertions(+), 28 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index 3236dd7bc3..e9147ec0f9 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, virCommandPtr nodeDeviceGetMdevctlStopCommand(const char *uuid, char **errmsg) { - virCommandPtr cmd =3D virCommandNewArgList(MDEVCTL, - "stop", - "-u", - uuid, - NULL); + virCommandPtr 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 129f438e4a..90a12cdd61 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,2 +1,2 @@ -$MDEVCTL_BINARY$ start -p 0000:00:02.0 --jsonfile /dev/stdin \ +$MDEVCTL_BINARY$ start --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 118ec7a8da..2dbde45872 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,2 +1,2 @@ -$MDEVCTL_BINARY$ define -p 0000:00:02.0 --jsonfile /dev/stdin \ +$MDEVCTL_BINARY$ define --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 eb7262035e..fc392f0c39 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 +1 @@ -$MDEVCTL_BINARY$ start -p 0000:00:02.0 --jsonfile /dev/stdin +$MDEVCTL_BINARY$ start --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 773e98b963..8a40b1037b 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 +1 @@ -$MDEVCTL_BINARY$ define -p 0000:00:02.0 --jsonfile /dev/stdin +$MDEVCTL_BINARY$ define --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 eb7262035e..fc392f0c39 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 +1 @@ -$MDEVCTL_BINARY$ start -p 0000:00:02.0 --jsonfile /dev/stdin +$MDEVCTL_BINARY$ start --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 773e98b963..8a40b1037b 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 +1 @@ -$MDEVCTL_BINARY$ define -p 0000:00:02.0 --jsonfile /dev/stdin +$MDEVCTL_BINARY$ define --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 dc0ae7be0e..dd92de8527 100644 --- a/tests/nodedevmdevctldata/mdevctl-start.argv +++ b/tests/nodedevmdevctldata/mdevctl-start.argv @@ -1 +1 @@ -$MDEVCTL_BINARY$ start -u d069d019-36ea-4111-8f0a-8c9a70e21366 +$MDEVCTL_BINARY$ start --uuid=3Dd069d019-36ea-4111-8f0a-8c9a70e21366 diff --git a/tests/nodedevmdevctldata/mdevctl-stop.argv b/tests/nodedevmdev= ctldata/mdevctl-stop.argv index 5bdb213a32..7549b6ff74 100644 --- a/tests/nodedevmdevctldata/mdevctl-stop.argv +++ b/tests/nodedevmdevctldata/mdevctl-stop.argv @@ -1 +1 @@ -$MDEVCTL_BINARY$ stop -u d069d019-36ea-4111-8f0a-8c9a70e21366 +$MDEVCTL_BINARY$ stop --uuid=3Dd069d019-36ea-4111-8f0a-8c9a70e21366 diff --git a/tests/nodedevmdevctldata/mdevctl-undefine.argv b/tests/nodedev= mdevctldata/mdevctl-undefine.argv index c2236727ef..8d5217beba 100644 --- a/tests/nodedevmdevctldata/mdevctl-undefine.argv +++ b/tests/nodedevmdevctldata/mdevctl-undefine.argv @@ -1 +1 @@ -$MDEVCTL_BINARY$ undefine -u d069d019-36ea-4111-8f0a-8c9a70e21366 +$MDEVCTL_BINARY$ undefine --uuid=3Dd069d019-36ea-4111-8f0a-8c9a70e21366 --=20 2.26.3