From nobody Thu Jul 17 13:45:01 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=1674562850; cv=none; d=zohomail.com; s=zohoarc; b=gh2bZsFtyntwKQIGQHgfschji+8IaKvrcDWvHmBg9yOapF3BhKl7rECWSy1zibb+25X3ztfC2vyObBiCVWdcqhf03l+wi0TRpKoZYwtDxTsj0m65g26MShv3cjfX6d+AnLn4FjKI5jbJg76Lq1gt2tkQ8fygYKtqsucuBUoXpkc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674562850; 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=Ap26owxk1u3DODVJclTuu2Ko/YuNT5FBtaRfmrv7qaU=; b=Vpau/y7WqjhNgjiVu/4IWtbYVjQ0FJZpK8TwqNouzBMBHH2mjotwV0jFp3JmF94gTCmSGeSBvjiAH9ry/Dux2hEuvt1pdRksnmIHlvbXpvr4S5QnjzrTMv7CHF7jY4pXtP2KWUTOUbd+ojgt9cNfDljBpa3a2PkNSZkef6bIQ20= 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 1674562850256631.3495255078752; Tue, 24 Jan 2023 04:20:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKIHM-0001rk-E0; Tue, 24 Jan 2023 07:19:56 -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 1pKIHK-0001ra-Rr for qemu-devel@nongnu.org; Tue, 24 Jan 2023 07:19:54 -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 1pKIHJ-0006PN-83 for qemu-devel@nongnu.org; Tue, 24 Jan 2023 07:19:54 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-515-oOQxsG-zNginQXfvQCHDKg-1; Tue, 24 Jan 2023 07:19:50 -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 8B69D802D1B; Tue, 24 Jan 2023 12:19:49 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 345172026D4B; Tue, 24 Jan 2023 12:19:49 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 95F6F21E6A26; Tue, 24 Jan 2023 13:19:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674562791; 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=Ap26owxk1u3DODVJclTuu2Ko/YuNT5FBtaRfmrv7qaU=; b=GayJdTvXVuvRhQxTVKxyvZfSWeRavsNafV+/aujmnsegTvfH2IqhYuF54qRlfYmbJHph0F niW1z/7mWAhqFJjQqruQ8M+kBOJcn6Q7MDmLmM8kCgZdodNpZ2Jqc9BcNEH7ZUap5FgWGX vvkWUYGBrDyJm6yeu8NaJQjiOrQp4AM= X-MC-Unique: oOQxsG-zNginQXfvQCHDKg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, kraxel@redhat.com, kwolf@redhat.com, hreitz@redhat.com, marcandre.lureau@redhat.com, dgilbert@redhat.com, mst@redhat.com, imammedo@redhat.com, ani@anisinha.ca, eduardo@habkost.net, marcel.apfelbaum@gmail.com, philmd@linaro.org, wangyanan55@huawei.com, jasowang@redhat.com, jiri@resnulli.us, berrange@redhat.com, thuth@redhat.com, quintela@redhat.com, stefanb@linux.vnet.ibm.com, stefanha@redhat.com, kvm@vger.kernel.org, qemu-block@nongnu.org Subject: [PATCH 07/32] hmp: Rename help_cmd() to hmp_help_cmd(), move declaration to hmp.h Date: Tue, 24 Jan 2023 13:19:21 +0100 Message-Id: <20230124121946.1139465-8-armbru@redhat.com> In-Reply-To: <20230124121946.1139465-1-armbru@redhat.com> References: <20230124121946.1139465-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.129.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: 1674562852356100001 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 --- 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