git: b43b8f81578c - main - mac_ddb: Only include the vnet validator in VIMAGE kernels.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 20 Jul 2022 23:03:26 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b43b8f81578cbb7bddbd6f7b8ebe06a219c88140 commit b43b8f81578cbb7bddbd6f7b8ebe06a219c88140 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-07-20 23:02:56 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-07-20 23:02:56 +0000 mac_ddb: Only include the vnet validator in VIMAGE kernels. This fixes the build of at least i386 MINIMAL which was failing with the error: sys/security/mac_ddb/mac_ddb.c:200:15: error: use of undeclared identifier 'vnet'; did you mean 'int'? if ((void *)vnet == (void *)addr) ^~~~ int Sponsored by: DARPA --- sys/security/mac_ddb/mac_ddb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/security/mac_ddb/mac_ddb.c b/sys/security/mac_ddb/mac_ddb.c index 89cba3145945..847be4997226 100644 --- a/sys/security/mac_ddb/mac_ddb.c +++ b/sys/security/mac_ddb/mac_ddb.c @@ -77,7 +77,9 @@ static db_validation_fn_t db_show_ffs_valid; static db_validation_fn_t db_show_prison_valid; static db_validation_fn_t db_show_proc_valid; static db_validation_fn_t db_show_rman_valid; +#ifdef VIMAGE static db_validation_fn_t db_show_vnet_valid; +#endif struct cmd_list_item { const char *name; @@ -96,7 +98,9 @@ static const struct cmd_list_item show_command_list[] = { { "proc", db_show_proc_valid }, { "rman", db_show_rman_valid }, { "thread", db_thread_valid }, +#ifdef VIMAGE { "vnet", db_show_vnet_valid }, +#endif }; static int @@ -188,6 +192,7 @@ db_show_rman_valid(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) return (EACCES); } +#ifdef VIMAGE static int db_show_vnet_valid(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) { @@ -203,6 +208,7 @@ db_show_vnet_valid(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) return (EACCES); } +#endif static int command_match(struct db_command *cmd, struct cmd_list_item item)