From nobody Sat Nov 23 16:58:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1723160367; cv=none; d=zohomail.com; s=zohoarc; b=ar1lTQf13gxMjaJWM5bvBvf51I+Y4qScJztqdkEukF2xdB88/FtbgojZ5gKTWahB94TYTXAcQcJmGuC11XIf1mBRuuKXV+DrEOf/6ASM2IIrpxXmd7kmsKFJXzsx3sWvqtaMSwmiQIlZmM8bLv/2l7/9jc394EMKstoEhyVJ16o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723160367; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=FTBy7sqesGTlhhgwEgNvelseUhc6GoVR86wh+79XwZ4=; b=YXC3btZVyewcqqvncgRhERj5BRSyXZSiSk06fHACl1k/K0HwmjN2fdQyZhrx5C0MTfWAa5fTdcUr+4Vfo7p0A3rDJyQMJxarXaiYTAeP3pLHfHCw57y/YrRiEpKs9jyfeT1ZaGWo4FVcgerzlJvGG7etvMVAqZiCvLK6JVjJi8I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1723160367433813.6186064744194; Thu, 8 Aug 2024 16:39:27 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 63051148F; Thu, 8 Aug 2024 19:39:26 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 23B4A12EB; Thu, 8 Aug 2024 19:38:27 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 0FAC212E2; Thu, 8 Aug 2024 19:38:22 -0400 (EDT) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 4EBCD12CA for ; Thu, 8 Aug 2024 19:38:21 -0400 (EDT) Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2eeb1ba0468so19135221fa.0 for ; Thu, 08 Aug 2024 16:38:21 -0700 (PDT) Received: from localhost ([69.51.98.127]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-81fd4d3a31esm418237639f.30.2024.08.08.16.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Aug 2024 16:38:19 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1723160300; x=1723765100; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=t/xvwSaY3jX8VHWwL2CY2MBTUQkNCC5tTcnoKyoUVQ0=; b=gy7luBISxmd8Zn3i8qyqYPYu+tQ8yaD9A7Bq9aAkAQyTwOn2u6w4wMMCO+gR6IV2kX JWbBOl61kaNQXWLRntEnbTzq52HorJD7RW5FS+336OclohFQmsfO3zA/QvPRvyi9/Y0b XVtkuSJ0FSA5cEljZXV/3kpj/zUOmeAnWCRV1fEN9ZlCju3uDpp6FNIy9byykSiY0ebK MQGrHi8+FjbPuoLLF719Wmg0zVNx9BjiNL+kwfvcupz+kiMWeqxESS8h5QpASjxyiDQi R9LfcD9jYhToFW2v4Nsqx8T2euTxFT2rxUtKnk0XkTZ88LRzyyrypp4m4a3AkWjdktA3 ND/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723160300; x=1723765100; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t/xvwSaY3jX8VHWwL2CY2MBTUQkNCC5tTcnoKyoUVQ0=; b=inLA+dhzsa5VW7TxtfUJDeTkie+aUo09vA7LVz9tig1CeXS0YNhlHC7Cl48Ek6nz80 /d+5HTnrr3xpHKS9K6mbuGzZBm8tDk+lp12Pzu93+yz4EU2fTVrd5Zb5oHiQIHN7uhcM 3QtGTcodxbHLx5O+qEHJ6g4ddVx4GyNw9HxYawaIF1Z6Zv/DdN+IfHMb47QN58BvBxMV y8/68W+Za5RebUYLj78ffVh88l9w+GDEaK4YLCHOutJx36Ig4dTGBFetlm8WTAThd8Q/ OhMSMNoP92Ahh8pmgv/YENLvjbbZD0OMSbIbtqrs3KQzNF6QEIz0zcEDcg2jl84RB/Gw AgYg== X-Gm-Message-State: AOJu0Yxlf1GQJybY8Buc+jmydEQhw6tTjjFuPUYDyc6ZwK9YHi6cftfb iLhmQ2NwZ+JWqnr2j6yzhoLGkADKoKvvS90ezX9qBEwzUtiZGMqLeO78m/r59Zs40RsExzary8R Z X-Google-Smtp-Source: AGHT+IGgfCLxsN23ToWPD3hcVh1hNnrMCzQoLGg6gUrGM+X7pZP1UdT87ib87pHycacjlZsEKOvRqg== X-Received: by 2002:a2e:a541:0:b0:2f0:20cd:35fc with SMTP id 38308e7fff4ca-2f19de1fed7mr28012111fa.7.1723160299939; Thu, 08 Aug 2024 16:38:19 -0700 (PDT) To: devel@lists.libvirt.org Subject: [PATCH 02/20] qemu_fd: Add function to retrieve fdset ID Date: Thu, 8 Aug 2024 17:37:55 -0600 Message-Id: <20240808233813.22905-3-jfehlig@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240808233813.22905-1-jfehlig@suse.com> References: <20240808233813.22905-1-jfehlig@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: N4JMKQYVWUNAY7BBNXUBCIB34M63EM3T X-Message-ID-Hash: N4JMKQYVWUNAY7BBNXUBCIB34M63EM3T X-MailFrom: jfehlig@suse.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: farosas@suse.de X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Jim Fehlig via Devel Reply-To: Jim Fehlig X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1723160368402116600 Content-Type: text/plain; charset="utf-8" Add new function qemuFDPassGetId() for retrieving the fdset ID of provided qemuFDPass object. Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_fd.c | 18 ++++++++++++++++++ src/qemu/qemu_fd.h | 3 +++ 2 files changed, 21 insertions(+) diff --git a/src/qemu/qemu_fd.c b/src/qemu/qemu_fd.c index e847056573..3ae4a87a20 100644 --- a/src/qemu/qemu_fd.c +++ b/src/qemu/qemu_fd.c @@ -276,6 +276,24 @@ qemuFDPassGetPath(qemuFDPass *fdpass) } =20 =20 +/** + * qemuFDPassGetId: + * @fdpass: The fd passing helper struct + * @id: An out parameter for providing the fdset ID + * + * Returns 0 on success, -1 on error. + */ +int +qemuFDPassGetId(qemuFDPass *fdpass, unsigned int *id) +{ + if (!fdpass) + return -1; + + *id =3D fdpass->fdSetID; + return 0; +} + + struct _qemuFDPassDirect { int fd; char *name; diff --git a/src/qemu/qemu_fd.h b/src/qemu/qemu_fd.h index cd0ff2c690..dfcd5fb754 100644 --- a/src/qemu/qemu_fd.h +++ b/src/qemu/qemu_fd.h @@ -58,6 +58,9 @@ qemuFDPassTransferMonitorRollback(qemuFDPass *fdpass, const char * qemuFDPassGetPath(qemuFDPass *fdpass); =20 +int +qemuFDPassGetId(qemuFDPass *fdpass, unsigned int *id); + =20 typedef struct _qemuFDPassDirect qemuFDPassDirect; =20 --=20 2.35.3