From nobody Sun Dec 22 07:05:34 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=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1734628179884371.69591322929796; Thu, 19 Dec 2024 09:09:39 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id D864A1800; Thu, 19 Dec 2024 12:09:38 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E0F3217BE; Thu, 19 Dec 2024 12:08:07 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 0F9A6167B; Thu, 19 Dec 2024 12:08:02 -0500 (EST) Received: from mail-oo1-f49.google.com (mail-oo1-f49.google.com [209.85.161.49]) (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 497DE1786 for ; Thu, 19 Dec 2024 12:08:01 -0500 (EST) Received: by mail-oo1-f49.google.com with SMTP id 006d021491bc7-5f2dee7d218so402833eaf.2 for ; Thu, 19 Dec 2024 09:08:01 -0800 (PST) Received: from home.. ([2603:8081:c640:1::1009]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-71fc9807c0fsm325938a34.41.2024.12.19.09.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 09:07:59 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734628080; x=1735232880; 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=/L3YHHfaSKNZsuWctr7Gl7+vimfIIkvrjqfcqA8pbnU=; b=KqPHmGnKUcFbWPPHeXDbOI9g1BV6JeUB6HgrKj3XWdcNI2Gtbz7pfD0KtFu3IerV9l wWguxhFvKEeZLCc9qKyc9DXzbhOqIkWnWwipntYk41llGR2eP9RWRM2xR+D30jG7lud6 eDgvz9iBDlSQ7hoJT4MeYTI1fXDaaS5LkBgsgB3fdyti9Mk2Tdl46PuMNWd6pCyWqu3E foUe56v6esXTYk3FH1GnFw53nJ9p5lvWjmH9VpSomCqKVsedwz1JWJOnwxmWi9SqBPyT PE/rwbzJBF8PrlC61r8kNMLK1Dh+cGZIec35bcfCSreZ6kPluofvPBnH85dX4Hnu1nNe A73g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734628080; x=1735232880; 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=/L3YHHfaSKNZsuWctr7Gl7+vimfIIkvrjqfcqA8pbnU=; b=JwN4DKtxEBWgfdJJlVV1ceTX729b17OXEkhkJ5PJYz+qI3zBhvVYMzY0egHphTACFc j2EvEBxDSpXUXX9jI+FCld8C4RWpel4Zmg8y2wRFvYcFNpv9eP/G46Isn8XStMLHmCgl 4XIz6Zt88mix+o2nUr5f5OLVeVdxONxK2VvZc1zEaRFWXXVUSjTYVlSjbTtb2kIOdaEt GrD/m89tXmUbTTKppUcF2xQQPyYBpaK9JDJfdzSP2pEvs/CImpDS+SL1VISbb6xk5+TN vBi+N+kmZIPswD6880inDuaPNrvY4v5D14+HIPOW6NMQl4DsZjfwp3GX7+XPN0ntyIBx OXig== X-Gm-Message-State: AOJu0YzAc9uMRayCv4q2fkUmJRBIl1yyuB+gsNH2rzUs9kc1NgtXpc0T cRGy9wfb4m/QjOVP/u7h19ISHDXrJ3Nsa5A2QRegjrHju3o6hTRC048EzV7R X-Gm-Gg: ASbGncsnLCFqYC+Eife0d8stvE15tWJQssvbFPOStTdJRxJD8558e8RiUvdE92ehr8o NWSVAhGnhXT58xYQGXkmAcZ8RZYlqDOe6mkmmM9Y8p78rqVeiD4OFhICd/o90H8bXPiJrDU8iCy ZoFT0UnecyZ2oA2DknzJBQZimQ5wURU6aVOfj3NXFM7791qdKGgAONeJEkyy0UG4gZIwjSo4cur YSsFWCefaBcdkj6bU67il55qmg1CDRbaZ1bFv2Y X-Google-Smtp-Source: AGHT+IE26GGnQzWVkphoW8EOy7B4PrNHt9oyvXTwB+/xuwjoQFxiT+bpmenatSe7aUNpMQrrZLc94w== X-Received: by 2002:a05:6820:189a:b0:5f2:df4c:d4a6 with SMTP id 006d021491bc7-5f4c9ba26aamr4002798eaf.8.1734628080030; Thu, 19 Dec 2024 09:08:00 -0800 (PST) From: Praveen K Paladugu To: devel@lists.libvirt.org Subject: [PATCH v2 02/11] hypervisor: rename reference to qemu in domain_logcontext Date: Thu, 19 Dec 2024 11:07:47 -0600 Message-ID: <20241219170756.30810-3-praveenkpaladugu@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241219170756.30810-1-praveenkpaladugu@gmail.com> References: <20241219170756.30810-1-praveenkpaladugu@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 2TFZHF4MBBAT2WQPUY5J7ZHEHEFRMXKB X-Message-ID-Hash: 2TFZHF4MBBAT2WQPUY5J7ZHEHEFRMXKB X-MailFrom: praveenkpaladugu@gmail.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: liuwe@microsoft.com 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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1734628181210116600 Content-Type: text/plain; charset="utf-8" Rename all references to qemu within domain_logcontext files. Signed-off-by: Praveen K Paladugu --- src/hypervisor/domain_logcontext.c | 60 +++++++++++++++--------------- src/hypervisor/domain_logcontext.h | 32 ++++++++-------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/hypervisor/domain_logcontext.c b/src/hypervisor/domain_log= context.c index 7932cf7712..3776d68ab9 100644 --- a/src/hypervisor/domain_logcontext.c +++ b/src/hypervisor/domain_logcontext.c @@ -1,5 +1,5 @@ /* - * domain_logcontext.c: QEMU log context + * domain_logcontext.c: Domain log context * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,7 +18,7 @@ =20 #include =20 -#include "qemu_logcontext.h" +#include "domain_logcontext.h" #include "viralloc.h" #include "virlog.h" #include "virstring.h" @@ -26,12 +26,12 @@ =20 #include =20 -#define VIR_FROM_THIS VIR_FROM_QEMU +#define VIR_FROM_THIS VIR_FROM_DOMAIN =20 -VIR_LOG_INIT("qemu.qemu_logcontext"); +VIR_LOG_INIT("domain.domain_logcontext"); =20 =20 -struct _qemuLogContext { +struct _domainLogContext { GObject parent; =20 int writefd; @@ -42,48 +42,48 @@ struct _qemuLogContext { virLogManager *manager; }; =20 -G_DEFINE_TYPE(qemuLogContext, qemu_log_context, G_TYPE_OBJECT); +G_DEFINE_TYPE(domainLogContext, domain_log_context, G_TYPE_OBJECT); =20 static void -qemuLogContextFinalize(GObject *obj); +domainLogContextFinalize(GObject *obj); =20 =20 static void -qemu_log_context_init(qemuLogContext *logctxt G_GNUC_UNUSED) +domain_log_context_init(domainLogContext *logctxt G_GNUC_UNUSED) { } =20 =20 static void -qemu_log_context_class_init(qemuLogContextClass *klass) +domain_log_context_class_init(domainLogContextClass *klass) { GObjectClass *obj =3D G_OBJECT_CLASS(klass); =20 - obj->finalize =3D qemuLogContextFinalize; + obj->finalize =3D domainLogContextFinalize; } =20 =20 static void -qemuLogContextFinalize(GObject *object) +domainLogContextFinalize(GObject *object) { - qemuLogContext *ctxt =3D QEMU_LOG_CONTEXT(object); + domainLogContext *ctxt =3D DOMAIN_LOG_CONTEXT(object); VIR_DEBUG("ctxt=3D%p", ctxt); =20 virLogManagerFree(ctxt->manager); VIR_FREE(ctxt->path); VIR_FORCE_CLOSE(ctxt->writefd); VIR_FORCE_CLOSE(ctxt->readfd); - G_OBJECT_CLASS(qemu_log_context_parent_class)->finalize(object); + G_OBJECT_CLASS(domain_log_context_parent_class)->finalize(object); } =20 =20 -qemuLogContext * -qemuLogContextNew(virQEMUDriver *driver, - virDomainObj *vm, - const char *basename) +domainLogContext * +domainLogContextNew(virQEMUDriver *driver, + virDomainObj *vm, + const char *basename) { g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); - qemuLogContext *ctxt =3D QEMU_LOG_CONTEXT(g_object_new(QEMU_TYPE_LOG_C= ONTEXT, NULL)); + domainLogContext *ctxt =3D DOMAIN_LOG_CONTEXT(g_object_new(DOMAIN_TYPE= _LOG_CONTEXT, NULL)); =20 VIR_DEBUG("Context new %p stdioLogD=3D%d", ctxt, cfg->stdioLogD); ctxt->writefd =3D -1; @@ -155,8 +155,8 @@ qemuLogContextNew(virQEMUDriver *driver, =20 =20 int -qemuLogContextWrite(qemuLogContext *ctxt, - const char *fmt, ...) +domainLogContextWrite(domainLogContext *ctxt, + const char *fmt, ...) { va_list argptr; g_autofree char *message =3D NULL; @@ -186,8 +186,8 @@ qemuLogContextWrite(qemuLogContext *ctxt, =20 =20 ssize_t -qemuLogContextRead(qemuLogContext *ctxt, - char **msg) +domainLogContextRead(domainLogContext *ctxt, + char **msg) { char *buf; size_t buflen; @@ -238,7 +238,7 @@ qemuLogContextRead(qemuLogContext *ctxt, =20 =20 /** - * qemuLogContextFilter: Read and filter log for relevant messages + * domainLogContextFilter: Read and filter log for relevant messages * @ctxt: the domain log context * @msg: pointer to buffer to store the read messages in * @max: maximum length of the message returned in @msg after filtering @@ -249,9 +249,9 @@ qemuLogContextRead(qemuLogContext *ctxt, * after a new line if possible. */ int -qemuLogContextReadFiltered(qemuLogContext *ctxt, - char **msg, - size_t max) +domainLogContextReadFiltered(domainLogContext *ctxt, + char **msg, + size_t max) { char *buf; char *eol; @@ -259,7 +259,7 @@ qemuLogContextReadFiltered(qemuLogContext *ctxt, size_t skip; ssize_t got; =20 - if ((got =3D qemuLogContextRead(ctxt, &buf)) < 0) + if ((got =3D domainLogContextRead(ctxt, &buf)) < 0) return -1; =20 /* Filter out debug messages from intermediate libvirt process */ @@ -302,14 +302,14 @@ qemuLogContextReadFiltered(qemuLogContext *ctxt, =20 =20 int -qemuLogContextGetWriteFD(qemuLogContext *ctxt) +domainLogContextGetWriteFD(domainLogContext *ctxt) { return ctxt->writefd; } =20 =20 void -qemuLogContextMarkPosition(qemuLogContext *ctxt) +domainLogContextMarkPosition(domainLogContext *ctxt) { if (ctxt->manager) virLogManagerDomainGetLogFilePosition(ctxt->manager, @@ -323,7 +323,7 @@ qemuLogContextMarkPosition(qemuLogContext *ctxt) =20 =20 virLogManager * -qemuLogContextGetManager(qemuLogContext *ctxt) +domainLogContextGetManager(domainLogContext *ctxt) { return ctxt->manager; } diff --git a/src/hypervisor/domain_logcontext.h b/src/hypervisor/domain_log= context.h index 572ac1026e..8bb7c3d217 100644 --- a/src/hypervisor/domain_logcontext.h +++ b/src/hypervisor/domain_logcontext.h @@ -1,5 +1,5 @@ /* - * domain_logcontext.h: QEMU log context + * domain_logcontext.h: Domain log context * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,20 +22,20 @@ #include "qemu_conf.h" #include "logging/log_manager.h" =20 -#define QEMU_TYPE_LOG_CONTEXT qemu_log_context_get_type() -G_DECLARE_FINAL_TYPE(qemuLogContext, qemu_log_context, QEMU, LOG_CONTEXT, = GObject); +#define DOMAIN_TYPE_LOG_CONTEXT domain_log_context_get_type() +G_DECLARE_FINAL_TYPE(domainLogContext, domain_log_context, DOMAIN, LOG_CON= TEXT, GObject); =20 -qemuLogContext *qemuLogContextNew(virQEMUDriver *driver, - virDomainObj *vm, - const char *basename); -int qemuLogContextWrite(qemuLogContext *ctxt, - const char *fmt, ...) G_GNUC_PRINTF(2, 3); -ssize_t qemuLogContextRead(qemuLogContext *ctxt, - char **msg); -int qemuLogContextReadFiltered(qemuLogContext *ctxt, - char **msg, - size_t max); -int qemuLogContextGetWriteFD(qemuLogContext *ctxt); -void qemuLogContextMarkPosition(qemuLogContext *ctxt); +domainLogContext *domainLogContextNew(virQEMUDriver *driver, + virDomainObj *vm, + const char *basename); +int domainLogContextWrite(domainLogContext *ctxt, + const char *fmt, ...) G_GNUC_PRINTF(2, 3); +ssize_t domainLogContextRead(domainLogContext *ctxt, + char **msg); +int domainLogContextReadFiltered(domainLogContext *ctxt, + char **msg, + size_t max); +int domainLogContextGetWriteFD(domainLogContext *ctxt); +void domainLogContextMarkPosition(domainLogContext *ctxt); =20 -virLogManager *qemuLogContextGetManager(qemuLogContext *ctxt); +virLogManager *domainLogContextGetManager(domainLogContext *ctxt); --=20 2.47.0