From nobody Tue Jul 05 15:08:58 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 990AC1D027B7; Tue, 5 Jul 2022 15:08:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LcmKR1G0Sz3tnn; Tue, 5 Jul 2022 15:08:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657033739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLKF9N96V5cc8zXJu/mHBGF/rfn4uloI5WmUcFoJnN4=; b=lmVwXWV4YvpWEQ0DKDMpu/OVzd89tSPEUU5Vu5XLOUp8WhRtOOjiBVmmMwn11tTX8Y3dmY SUvNni2ulnD7AfXHtgrv5on9fdp5BzlWZZePiHDqosHOKoZnccT5qWCQKmk4l+3OByM0Bd VTZlXXyaYdNCY7UVStz0tvOws1k4twdwYPtF1I5oO3PVYJxfqOzWw9ENvYzm2vKHkmD5nT 1vmbkXiffn0rbg3zAXuaxkmgugItE0lOrRjBJtuCf0yJsDBbIc9UQwofYFVGJGxClXdHD/ EK9qraz28ST7uEPtJpet61RxjC9/Y2poCVBLZWmZY/C5EoXO6U0LuKWW27x8Wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F13EB277F9; Tue, 5 Jul 2022 15:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 265F8wk5069977; Tue, 5 Jul 2022 15:08:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 265F8wXI069976; Tue, 5 Jul 2022 15:08:58 GMT (envelope-from git) Date: Tue, 5 Jul 2022 15:08:58 GMT Message-Id: <202207051508.265F8wXI069976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 7ce58d4e8c0c - main - ddb: add _FLAGS command variants List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ce58d4e8c0cfcb42ec404aed6185b5eb7eef8a8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657033739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLKF9N96V5cc8zXJu/mHBGF/rfn4uloI5WmUcFoJnN4=; b=lPWZT5jy8zpE1UHNx/orpSFYQeerUmTMS8jGArB6Zkv4mARqfi9ti9w+AbnfqRh6yTJvBv qZk1gLLbXWB+XhDpX5ZIVPRLBKo79j+pGzNaTHJrBcrhVuUW/t8pVCOrX16LERB6JnSlQ1 YSe5p+Hk2gT9KUZ/xiI45Ejmpbpq+70GneDsW+y3fnjW9bE7c0Yz/abCJQ9z0ZkrulJ4KM +u8V6OwmCKAVEwsUQj4wDJ+U2zV2pGzZqPvQ32DyMS66ivMVFAZq/3OJZ0qDu3ZIY9e7oP KQ7Kleo+dHaxL8xLMVPNx+iMLUIgsysSaRgeCuXzMvWuigvPJdr1HTQvrN2bnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657033739; a=rsa-sha256; cv=none; b=tIfTCQA5ebldu3HyCs3pRnr/QlFzrMSjWVfD5b9DFgaw9yYDZc8p5B7+kXCjknh0waXiOL CdvHTpGNV+CefnPOACJv+Fp4DbZo3zvaCFYVjmM0elSU7JsaWYD5RITidR5OYIE+P7quof QtSbfIVGoCBNLUU5Jee2Pkk8senNWrjnYu24vorOEY/NbhiOmtHaEQHUxj8nLDGDqY2GW1 JMZM+QIiBdja6OODd7jqVOHwDN1R7MzEuEK3+nPlbHE7eHOG54iTvtexpBn9rvTtKnPfgm mr4MFaWOsmCEp5g8jOILHhBTVTsfqBvZMLzkjUCb6hDkZ2yP4id0elX+xkTDJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7ce58d4e8c0cfcb42ec404aed6185b5eb7eef8a8 commit 7ce58d4e8c0cfcb42ec404aed6185b5eb7eef8a8 Author: Mitchell Horne AuthorDate: 2022-06-30 15:58:22 +0000 Commit: Mitchell Horne CommitDate: 2022-07-05 14:56:42 +0000 ddb: add _FLAGS command variants Provide _FLAGS variants of the various command definition macros, in anticipation of adding a new flag. This can also be used for some existing commands which require special flag values. Reviewed by: markj MFC after: 3 days Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35581 --- sys/ddb/ddb.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h index 1ae278965dde..4e63907a6ed0 100644 --- a/sys/ddb/ddb.h +++ b/sys/ddb/ddb.h @@ -164,14 +164,22 @@ _func(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) #define DB_FUNC(_name, _func, list, _flag, _more) \ _DB_FUNC(_cmd, _name, _func, list, _flag, _more) +#define DB_COMMAND_FLAGS(cmd_name, func_name, flags) \ + _DB_FUNC(_cmd, cmd_name, func_name, db_cmd_table, flags, NULL) #define DB_COMMAND(cmd_name, func_name) \ - _DB_FUNC(_cmd, cmd_name, func_name, db_cmd_table, 0, NULL) + DB_COMMAND_FLAGS(cmd_name, func_name, 0) +#define DB_ALIAS_FLAGS(alias_name, func_name, flags) \ + _DB_SET(_cmd, alias_name, func_name, db_cmd_table, flags, NULL) #define DB_ALIAS(alias_name, func_name) \ - _DB_SET(_cmd, alias_name, func_name, db_cmd_table, 0, NULL) + DB_ALIAS_FLAGS(alias_name, func_name, 0) +#define DB_SHOW_COMMAND_FLAGS(cmd_name, func_name, flags) \ + _DB_FUNC(_show, cmd_name, func_name, db_show_table, flags, NULL) #define DB_SHOW_COMMAND(cmd_name, func_name) \ - _DB_FUNC(_show, cmd_name, func_name, db_show_table, 0, NULL) + DB_SHOW_COMMAND_FLAGS(cmd_name, func_name, 0) +#define DB_SHOW_ALIAS_FLAGS(alias_name, func_name, flags) \ + _DB_SET(_show, alias_name, func_name, db_show_table, flags, NULL) #define DB_SHOW_ALIAS(alias_name, func_name) \ - _DB_SET(_show, alias_name, func_name, db_show_table, 0, NULL) + DB_SHOW_ALIAS_FLAGS(alias_name, func_name, 0) #define DB_SHOW_ALL_COMMAND(cmd_name, func_name) \ _DB_FUNC(_show_all, cmd_name, func_name, db_show_all_table, 0, NULL) #define DB_SHOW_ALL_ALIAS(alias_name, func_name) \