From nobody Tue May 13 12:01:05 2025 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1675414302; cv=none; d=zohomail.com; s=zohoarc; b=Q/46G/SFWvpARy6gDKlzEnbZhRfzSgsTkT8Tz/QYMqYW6UxmwSmX1c16WKGt4BIk8KCneEzFodrk+VAO4ZpICQBsegwHDO1bP3YI2UzUyUkJIPnHxWpqWWGTKTq7xoBPYwMtd5KTo1FRqHE0qe0YdfZaI3H1tAt+V2vF0emUzaM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675414302; h=Content-Type:Content-Transfer-Encoding:Cc: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=lqVKZVF7r5I8Coms5It0htQYCXnldONuO37fWqivKso=; b=YDAI2kYlBF1iIADswFMeHSLID/MQiBoIG+p3YPJVaPdEWGa4Vfavx3xrrPDwPcUikdqXQFu3/DiQs4t1HcABEvp3W+2H7Nlg8jBkzeug75xxBneHweQeOBMs5CJsVgv/pJcbtYLmO7Tw0ZBdFXE4yMyo1/fo9nONsWq4MVJYkls= 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+importer2=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 1675414302468570.4293054389288; Fri, 3 Feb 2023 00:51:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNriK-00006b-0q; Fri, 03 Feb 2023 03:46:32 -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 1pNrhs-0008LO-1a for qemu-devel@nongnu.org; Fri, 03 Feb 2023 03:46:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNrhl-0007UL-Tf for qemu-devel@nongnu.org; Fri, 03 Feb 2023 03:46:02 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-544-yw-ozIaPNRqzwkNX70G9kA-1; Fri, 03 Feb 2023 03:45:52 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 75A2E3C1016D; Fri, 3 Feb 2023 08:45:52 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5167E2026D37; Fri, 3 Feb 2023 08:45:52 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id C64AA21E6901; Fri, 3 Feb 2023 09:45:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675413956; 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=lqVKZVF7r5I8Coms5It0htQYCXnldONuO37fWqivKso=; b=Jtg737bP30ocMY1Qb8MtQePyIUS4TnMir9sre+pkZl6uieZ21FQtjIWjSWlKscnKdGoF14 okoa2bekUNWWNv1TDJdzF5g9WZYHE9V4oSkrPCDoimIcseaDg0R0/wqh6Motewfl9Fu9Jm yFnl07xMuuEhdAXxF9Lm3sZ68b0Dfo4= X-MC-Unique: yw-ozIaPNRqzwkNX70G9kA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Subject: [PULL 10/35] hmp: Rename help_cmd() to hmp_help_cmd(), move declaration to hmp.h Date: Fri, 3 Feb 2023 09:45:24 +0100 Message-Id: <20230203084549.2622302-11-armbru@redhat.com> In-Reply-To: <20230203084549.2622302-1-armbru@redhat.com> References: <20230203084549.2622302-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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, 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1675414303503100001 Content-Type: text/plain; charset="utf-8" The next commit will move a caller of help_cmd() to a new file. Including monitor/monitor-internal.h there just for help_cmd() feels silly. Better to provide it in monitor/hmp.h suitably renamed. Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-8-armbru@redhat.com> --- include/monitor/hmp.h | 1 + monitor/monitor-internal.h | 1 - monitor/hmp.c | 2 +- monitor/misc.c | 8 ++++---- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index c25bec1863..5a75f4659c 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -18,6 +18,7 @@ #include "qapi/qapi-types-common.h" =20 bool hmp_handle_error(Monitor *mon, Error *err); +void hmp_help_cmd(Monitor *mon, const char *name); =20 void hmp_info_name(Monitor *mon, const QDict *qdict); void hmp_info_version(Monitor *mon, const QDict *qdict); diff --git a/monitor/monitor-internal.h b/monitor/monitor-internal.h index a2cdbbf646..53e3808054 100644 --- a/monitor/monitor-internal.h +++ b/monitor/monitor-internal.h @@ -186,7 +186,6 @@ void monitor_data_destroy_qmp(MonitorQMP *mon); void coroutine_fn monitor_qmp_dispatcher_co(void *data); =20 int get_monitor_def(Monitor *mon, int64_t *pval, const char *name); -void help_cmd(Monitor *mon, const char *name); void handle_hmp_command(MonitorHMP *mon, const char *cmdline); int hmp_compare_cmd(const char *name, const char *list); =20 diff --git a/monitor/hmp.c b/monitor/hmp.c index 893e100581..844cf54c18 100644 --- a/monitor/hmp.c +++ b/monitor/hmp.c @@ -271,7 +271,7 @@ static void help_cmd_dump(Monitor *mon, const HMPComman= d *cmds, } } =20 -void help_cmd(Monitor *mon, const char *name) +void hmp_help_cmd(Monitor *mon, const char *name) { char *args[MAX_ARGS]; int nb_args =3D 0; diff --git a/monitor/misc.c b/monitor/misc.c index 9da52939b2..240d137327 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -153,7 +153,7 @@ int hmp_compare_cmd(const char *name, const char *list) =20 static void do_help_cmd(Monitor *mon, const QDict *qdict) { - help_cmd(mon, qdict_get_try_str(qdict, "name")); + hmp_help_cmd(mon, qdict_get_try_str(qdict, "name")); } =20 static void hmp_trace_event(Monitor *mon, const QDict *qdict) @@ -195,14 +195,14 @@ static void hmp_trace_file(Monitor *mon, const QDict = *qdict) } } else { monitor_printf(mon, "unexpected argument \"%s\"\n", op); - help_cmd(mon, "trace-file"); + hmp_help_cmd(mon, "trace-file"); } } #endif =20 static void hmp_info_help(Monitor *mon, const QDict *qdict) { - help_cmd(mon, "info"); + hmp_help_cmd(mon, "info"); } =20 static void monitor_init_qmp_commands(void) @@ -424,7 +424,7 @@ static void hmp_log(Monitor *mon, const QDict *qdict) } else { mask =3D qemu_str_to_log_mask(items); if (!mask) { - help_cmd(mon, "log"); + hmp_help_cmd(mon, "log"); return; } } --=20 2.39.0