From nobody Sat Nov 23 21:06:12 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1731942810; cv=none; d=zohomail.com; s=zohoarc; b=N1cx349tN7SiZrEuyPc7BaYbUf3T+Bx/2aa+6QTJL0/gvaIorDYzg8/OUijI9W8ESEqeK9n3ar62rSD8l/RyLNzGNfUH7y5kgDQ3zigvMPUPcnpzs/Iuzf59zeayVivNqsdFmFGsIYmqTWHxiwvtU4EOpolFnB2Ot1KuzYqeR6A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731942810; h=Content-Type: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:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=91bDsXGibs4V0p1WGe00JPcTn9dCGmR0LcE5tgvzZGo=; b=P+f17y46jmHL3wyjMOLJWgAQ4I5N0j2RNI9csok06J1qkslqHl7nUvAHcmb7vWA7cpxSpn1X4u0nfjCqnWZv0k1ai6XUBMSeFTG9AqZUK7wJNJCHeSod3l8+UnjMvqs5KCmk23z86H3yop6DhOrZ6shLiSS4HuIcwt5VCzv75wk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1731942810422198.079868482395; Mon, 18 Nov 2024 07:13:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tD3Qk-0007gY-PV; Mon, 18 Nov 2024 10:12:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tD3Qk-0007gO-3P for qemu-devel@nongnu.org; Mon, 18 Nov 2024 10:12:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tD3Qi-0002qD-48 for qemu-devel@nongnu.org; Mon, 18 Nov 2024 10:12:45 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-137-V7vkQfESMNuZGxqBIopKMQ-1; Mon, 18 Nov 2024 10:12:39 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7C270193E894; Mon, 18 Nov 2024 15:12:38 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.194.95]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C879B195E483; Mon, 18 Nov 2024 15:12:37 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id C2A1D21E692E; Mon, 18 Nov 2024 16:12:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731942761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=91bDsXGibs4V0p1WGe00JPcTn9dCGmR0LcE5tgvzZGo=; b=hIQDhKMSdDbOJhD+96eJaJgtGP1FMFCAmr5OUDxNPhIUlFbjNJnlGkwEwnLPKNZRMLFHcm ABmcJ7ko6Sn5jqXYZVzOI3xfi3QjcjS28z5h9T7wyw+FUtV5TtYpE99W6jl64uqYgIu1nr B/evl6Btdx7YpraR2ac5QTJZ/aXUfgU= X-MC-Unique: V7vkQfESMNuZGxqBIopKMQ-1 X-Mimecast-MFC-AGG-ID: V7vkQfESMNuZGxqBIopKMQ From: Markus Armbruster To: qemu-devel@nongnu.org Cc: berrange@redhat.com, Zhao Liu Subject: [PATCH v3 2/2] qapi: Move and rename qapi/qmp/dispatch.h to qapi/qmp-registry.h Date: Mon, 18 Nov 2024 16:12:35 +0100 Message-ID: <20241118151235.2665921-3-armbru@redhat.com> In-Reply-To: <20241118151235.2665921-1-armbru@redhat.com> References: <20241118151235.2665921-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1731942840879116600 From: Daniel P. Berrang=C3=A9 The general expectation is that header files should follow the same file/path naming scheme as the corresponding source file. There are various historical exceptions to this practice in QEMU, with one of the most notable being the include/qapi/qmp/ directory. include/qapi/qmp/dispatch.h corresponds mostly to qapi/qmp-registry.c. Move and rename it to include/qapi/qmp-registry.h. Now just qerror.h is left in include/qapi/qmp/. Since it's deprecated & (slowly) getting eliminated anyway, it isn't worth moving. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.rst | 2 +- include/qapi/{qmp/dispatch.h =3D> qmp-registry.h} | 0 monitor/monitor-internal.h | 2 +- qga/guest-agent-core.h | 2 +- qapi/qmp-dispatch.c | 2 +- qapi/qmp-registry.c | 2 +- stubs/qmp-command-available.c | 2 +- stubs/qmp-quit.c | 2 +- system/qdev-monitor.c | 2 +- scripts/qapi/commands.py | 2 +- 10 files changed, 9 insertions(+), 9 deletions(-) rename include/qapi/{qmp/dispatch.h =3D> qmp-registry.h} (100%) diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst index 90d1dfa16c..ea26b8b473 100644 --- a/docs/devel/qapi-code-gen.rst +++ b/docs/devel/qapi-code-gen.rst @@ -1854,7 +1854,7 @@ Example:: #ifndef EXAMPLE_QAPI_INIT_COMMANDS_H #define EXAMPLE_QAPI_INIT_COMMANDS_H =20 - #include "qapi/qmp/dispatch.h" + #include "qapi/qmp-registry.h" =20 void example_qmp_init_marshal(QmpCommandList *cmds); =20 diff --git a/include/qapi/qmp/dispatch.h b/include/qapi/qmp-registry.h similarity index 100% rename from include/qapi/qmp/dispatch.h rename to include/qapi/qmp-registry.h diff --git a/monitor/monitor-internal.h b/monitor/monitor-internal.h index 797e89a999..efce002334 100644 --- a/monitor/monitor-internal.h +++ b/monitor/monitor-internal.h @@ -28,7 +28,7 @@ #include "chardev/char-fe.h" #include "monitor/monitor.h" #include "qapi/qapi-types-control.h" -#include "qapi/qmp/dispatch.h" +#include "qapi/qmp-registry.h" #include "qobject/json-parser.h" #include "qemu/readline.h" #include "sysemu/iothread.h" diff --git a/qga/guest-agent-core.h b/qga/guest-agent-core.h index b4e7c52c61..a536d07d0d 100644 --- a/qga/guest-agent-core.h +++ b/qga/guest-agent-core.h @@ -13,7 +13,7 @@ #ifndef GUEST_AGENT_CORE_H #define GUEST_AGENT_CORE_H =20 -#include "qapi/qmp/dispatch.h" +#include "qapi/qmp-registry.h" #include "qga-qapi-types.h" =20 #define QGA_READ_COUNT_DEFAULT 4096 diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index e24ba9f0b6..fa95fcceac 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -16,7 +16,7 @@ #include "block/aio.h" #include "qapi/compat-policy.h" #include "qapi/error.h" -#include "qapi/qmp/dispatch.h" +#include "qapi/qmp-registry.h" #include "qobject/qdict.h" #include "qobject/qjson.h" #include "qapi/qobject-input-visitor.h" diff --git a/qapi/qmp-registry.c b/qapi/qmp-registry.c index 485bc5e6fc..ac989074ed 100644 --- a/qapi/qmp-registry.c +++ b/qapi/qmp-registry.c @@ -13,7 +13,7 @@ */ =20 #include "qemu/osdep.h" -#include "qapi/qmp/dispatch.h" +#include "qapi/qmp-registry.h" =20 void qmp_register_command(QmpCommandList *cmds, const char *name, QmpCommandFunc *fn, QmpCommandOptions options, diff --git a/stubs/qmp-command-available.c b/stubs/qmp-command-available.c index 46540af7bf..8851faced1 100644 --- a/stubs/qmp-command-available.c +++ b/stubs/qmp-command-available.c @@ -1,5 +1,5 @@ #include "qemu/osdep.h" -#include "qapi/qmp/dispatch.h" +#include "qapi/qmp-registry.h" =20 bool qmp_command_available(const QmpCommand *cmd, Error **errp) { diff --git a/stubs/qmp-quit.c b/stubs/qmp-quit.c index a3ff47f7bd..8fb523e905 100644 --- a/stubs/qmp-quit.c +++ b/stubs/qmp-quit.c @@ -1,6 +1,6 @@ #include "qemu/osdep.h" #include "qapi/qapi-commands-control.h" -#include "qapi/qmp/dispatch.h" +#include "qapi/qmp-registry.h" =20 void qmp_quit(Error **errp) { diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c index ae4c786930..f0fff8f607 100644 --- a/system/qdev-monitor.c +++ b/system/qdev-monitor.c @@ -26,7 +26,7 @@ #include "sysemu/runstate.h" #include "qapi/error.h" #include "qapi/qapi-commands-qdev.h" -#include "qapi/qmp/dispatch.h" +#include "qapi/qmp-registry.h" #include "qobject/qdict.h" #include "qapi/qmp/qerror.h" #include "qobject/qstring.h" diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py index f0aa13b5cf..74f341b2c7 100644 --- a/scripts/qapi/commands.py +++ b/scripts/qapi/commands.py @@ -346,7 +346,7 @@ def _begin_user_module(self, name: str) -> None: def visit_begin(self, schema: QAPISchema) -> None: self._add_module('./init', ' * QAPI Commands initialization') self._genh.add(mcgen(''' -#include "qapi/qmp/dispatch.h" +#include "qapi/qmp-registry.h" =20 void %(c_prefix)sqmp_init_marshal(QmpCommandList *cmds); ''', --=20 2.46.0