From nobody Thu Aug 11 14:32:50 2022 X-Original-To: dev-commits-src-branches@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 4M3Tmg1yKFz4Y1TC; Thu, 11 Aug 2022 14:32:51 +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 4M3Tmf3pDLz3Md9; Thu, 11 Aug 2022 14:32:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660228370; 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=48/QRKOzYF0kZpcGWQ5qszMxlg5bv5q9oLEst1U3dmo=; b=BT5oQP/t5Wbddms62HDvJebsW+aqvXA303k195MkPpq7P7Zutu6KhhG7av57hhB0KvAVSP asUICfDNSPpfKeOOC43vrte2394omM5Ki6h5FxVgVEP9sTkKc3Mp3f5hRHAysO4fQGb2XI CyXRCQKC/g/eBfCISpuCbTg9tmQdBGVgt0gGCn1iJzj8gRRHynZo9piK1t4TZN1X77LDH7 fmq+yAJkuNHrlsXkwRZJpW/YjiV1fddLD2DbLaFyVBPMALZ7v/VAybSNIaaaYJr0i1j3Re O1VVAbbyW9L/HImS6OU4phRzxj6XASS/z5L3vks991nfViTXgxLQF9wsy3/5xg== 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 4M3Tmf2VQPzvLX; Thu, 11 Aug 2022 14:32:50 +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 27BEWoue004575; Thu, 11 Aug 2022 14:32:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27BEWofT004574; Thu, 11 Aug 2022 14:32:50 GMT (envelope-from git) Date: Thu, 11 Aug 2022 14:32:50 GMT Message-Id: <202208111432.27BEWofT004574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 53021bbf8255 - stable/13 - ddb: add _FLAGS command variants List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 53021bbf8255f57a422f9874a108d4a679b180a2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660228370; 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=48/QRKOzYF0kZpcGWQ5qszMxlg5bv5q9oLEst1U3dmo=; b=Pm1g7YqNDdUK9tQYBMTz1AhDRKvpvbVv5YjfLf3bDQpPxakXYtJi7k4VlsY4se1moiXLBL x2JjiLG3OYie2RNf8baBx8gGN+4uaAXjcp9l/J5XQHALcgB8+1/VeXPB6R5EnEiItSlkv0 dvRv7GjVfBcxt0bYZRV0V++SgSV3Kxlc3RjVCltRWWmolRq5yFzLMbLkPpD7IPFx9hUihI mfu1hYSfCpruSD+Cvph88O28Oi8KScTQYoYJIpZzbWlQuSSZT5v0lJY5c2OibVasjd5pJb DT/bf2H1rS4WLRcOzoCTIUSMTVVYxUlsCtochx+6hPeGuOZVGmSNWfhyliiLoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660228370; a=rsa-sha256; cv=none; b=Om7z0OMJkMBszRV3lSHQapp4cmRR3tqyfmzhRRRPU9frWfkrz6t8cFGppEB12qtSOxLT2N mnse4D8toGIcOsVhFrVqokYqUegZZ/AeMNrWD52CICIyJTDDEvU/rtEV8LMtq2psTY4RII oHkaPsjn1KpiyGc44WNaOI8W/OfzLhdPQLa4tIlU7iPv4HG3SByOuSkHDudC3wJDUHV+K/ GuL5kGfqXJlxQg3wr9VGjasx4O0mwc4XAPlsH4Xlevgcap1gUR1jaDQwMQPBe2uw77f2K9 FfKkpyBGwfJfgEUv5jFVYuc5m5gXE4yZt6OZTIK1Q+5YkS2eVXxrTzuuucQPbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=53021bbf8255f57a422f9874a108d4a679b180a2 commit 53021bbf8255f57a422f9874a108d4a679b180a2 Author: Mitchell Horne AuthorDate: 2022-06-30 15:58:22 +0000 Commit: Mitchell Horne CommitDate: 2022-08-11 14:22:57 +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 (cherry picked from commit 7ce58d4e8c0cfcb42ec404aed6185b5eb7eef8a8) --- 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 3bd049de422b..ea634ae55bf8 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) \