From nobody Mon Apr 29 13:05:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521649785344371.6365875934208; Wed, 21 Mar 2018 09:29:45 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id CFCEE81E01; Wed, 21 Mar 2018 16:29:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A819C84748; Wed, 21 Mar 2018 16:29:43 +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 6C18D181B9FF; Wed, 21 Mar 2018 16:29:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2LGSbiR017712 for ; Wed, 21 Mar 2018 12:28:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 07441215CDC7; Wed, 21 Mar 2018 16:28:37 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2C6B215CDA7 for ; Wed, 21 Mar 2018 16:28:36 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 21 Mar 2018 17:28:33 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] virCommandPassFD: Give name to flags 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 21 Mar 2018 16:29:44 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The flags passed to virCommandPassFD() are unnamed and documentation to this function doesn't list them either. Give them name and mention it in documentation to functions using them. Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Laine Stump --- src/util/vircommand.c | 8 ++++---- src/util/vircommand.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 17cbdab7b7..8a319069fd 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -173,9 +173,9 @@ virCommandFDIsSet(virCommandPtr cmd, =20 /* * virCommandFDSet: - * @fd: FD to be put into @set - * @set: the set - * @set_size: actual size of @set + * @cmd: pointer to virCommand + * @fd: file descriptor to pass + * @flags: extra flags; binary-OR of virCommandPassFDFlags * * This is practically generalized implementation * of FD_SET() as we do not want to be limited @@ -976,7 +976,7 @@ virCommandNewVAList(const char *binary, va_list list) * virCommandPassFD: * @cmd: the command to modify * @fd: fd to reassign to the child - * @flags: the flags + * @flags: extra flags; binary-OR of virCommandPassFDFlags * * Transfer the specified file descriptor to the child, instead * of closing it on exec. @fd must not be one of the three diff --git a/src/util/vircommand.h b/src/util/vircommand.h index d59278cf5f..883e212959 100644 --- a/src/util/vircommand.h +++ b/src/util/vircommand.h @@ -51,10 +51,10 @@ virCommandPtr virCommandNewVAList(const char *binary, v= a_list list) * delayed until the Run/RunAsync methods */ =20 -enum { +typedef enum { /* Close the FD in the parent */ VIR_COMMAND_PASS_FD_CLOSE_PARENT =3D (1 << 0), -}; +} virCommandPassFDFlags; =20 void virCommandPassFD(virCommandPtr cmd, int fd, --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon Apr 29 13:05:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521649792959854.3427597806284; Wed, 21 Mar 2018 09:29:52 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C3174C0587CE; Wed, 21 Mar 2018 16:29:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9BBEB8CA21; Wed, 21 Mar 2018 16:29:51 +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 5CAB8180613A; Wed, 21 Mar 2018 16:29:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2LGSbuQ017719 for ; Wed, 21 Mar 2018 12:28:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9A03B215CDA7; Wed, 21 Mar 2018 16:28:37 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4159F2166BDA for ; Wed, 21 Mar 2018 16:28:37 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 21 Mar 2018 17:28:34 +0100 Message-Id: <1aad9046d9aa8c093aac6384b424465a4dec551c.1521649681.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] virCommandFDIsSet: Update documentation 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 21 Mar 2018 16:29:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The set of arguments was changed a long time ago (040d9963420 which dates back to July 2013) but the corresponding documentation was not updated. Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Laine Stump --- src/util/vircommand.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 8a319069fd..6dab105f56 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -147,9 +147,8 @@ static int dryRunStatus; =20 /* * virCommandFDIsSet: - * @fd: FD to test - * @set: the set - * @set_size: actual size of @set + * @cmd: pointer to virCommand + * @fd: file descriptor to query * * Check if FD is already in @set or not. * --=20 2.16.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list