Skip to contentSkip to conversation

libnftables: Drop symbol nft_bison_have_extended_errors

PATCH Applied Phil Sutter 2 participants 4 messages Sep 1 – Sep 2 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 libnftables: Drop symbol nft_bison_have_extended_errors

It was merely used to indicate extended parser error support in 'nft --version' output. Not worth bumping library version just for that, so drop it again.

Fixes b315dd551dd96 ("parser_bison: Fix for bison < 3.6")
---
 include/nftables/libnftables.h |  2 --
 src/libnftables.map            |  4 ----
 src/main.c                     | 15 ++++++---------
 src/parser_bison.y             |  4 ----
 4 files changed, 6 insertions(+), 19 deletions(-)
include/nftables/libnftables.h +0 -2
index 90b3f1b84a66f..c1d48d765a423 100644
@@ -99,8 +99,6 @@ void nft_ctx_clear_vars(struct nft_ctx *ctx);
 int nft_run_cmd_from_buffer(struct nft_ctx *nft, const char *buf);
 int nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename);
 
-extern bool nft_bison_have_extended_errors;
-
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
src/libnftables.map +0 -4
index 55c64f40e6a28..9369f44f35367 100644
@@ -38,7 +38,3 @@ LIBNFTABLES_4 {
   nft_ctx_input_get_flags;
   nft_ctx_input_set_flags;
 } LIBNFTABLES_3;
-
-LIBNFTABLES_5 {
-  nft_bison_have_extended_errors;
-} LIBNFTABLES_4;
src/main.c +6 -9
index 976410b05fba8..c8430174f5450 100644
@@ -237,7 +237,7 @@ static void show_help(const char *name)
 
 static void show_version(void)
 {
-	const char *cli, *minigmp, *json, *xt, *ext_bsn_err;
+	const char *cli, *minigmp, *json, *xt;
 
 #if defined(HAVE_LIBREADLINE)
 	cli = "readline";
@@ -266,16 +266,13 @@ static void show_version(void)
 #else
 	xt = "no";
 #endif
-	ext_bsn_err = nft_bison_have_extended_errors ? "yes" : "no";
-
 	printf("%s v%s (%s)\n"
-	       "  cli:				%s\n"
-	       "  json:				%s\n"
-	       "  minigmp:			%s\n"
-	       "  libxtables:			%s\n"
-	       "  extended parser errors:	%s\n",
+	       "  cli:		%s\n"
+	       "  json:		%s\n"
+	       "  minigmp:	%s\n"
+	       "  libxtables:	%s\n",
 	       PACKAGE_NAME, PACKAGE_VERSION, RELEASE_NAME,
-	       cli, json, minigmp, xt, ext_bsn_err);
+	       cli, json, minigmp, xt);
 
 }
 
src/parser_bison.y +0 -4
index 3967993472960..c63007321e339 100644
@@ -6677,8 +6677,4 @@ yyreport_syntax_error(const yypcontext_t *yyctx, struct nft_ctx *nft,
 	return 0;
 }
 
-bool nft_bison_have_extended_errors = true;
-#else /* ! YY_LAC_ESTABLISH */
-bool nft_bison_have_extended_errors = false;
 #endif /* YY_LAC_ESTABLISH */
-EXPORT_SYMBOL(nft_bison_have_extended_errors);
Signature · 1 line
2.54.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Phil Sutter

It was merely used to indicate extended parser error support in 'nft --version' output. Not worth bumping library version just for that, so drop it again.

Fixes b315dd551dd96 ("parser_bison: Fix for bison < 3.6")

Thanks

Quoted 83 lines
---
 include/nftables/libnftables.h |  2 --
 src/libnftables.map            |  4 ----
 src/main.c                     | 15 ++++++---------
 src/parser_bison.y             |  4 ----
 4 files changed, 6 insertions(+), 19 deletions(-)
include/nftables/libnftables.h +0 -2
index 90b3f1b84a66f..c1d48d765a423 100644
@@ -99,8 +99,6 @@ void nft_ctx_clear_vars(struct nft_ctx *ctx);
 int nft_run_cmd_from_buffer(struct nft_ctx *nft, const char *buf);
 int nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename);
 
-extern bool nft_bison_have_extended_errors;
-
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
src/libnftables.map +0 -4
index 55c64f40e6a28..9369f44f35367 100644
@@ -38,7 +38,3 @@ LIBNFTABLES_4 {
   nft_ctx_input_get_flags;
   nft_ctx_input_set_flags;
 } LIBNFTABLES_3;
-
-LIBNFTABLES_5 {
-  nft_bison_have_extended_errors;
-} LIBNFTABLES_4;
src/main.c +6 -9
index 976410b05fba8..c8430174f5450 100644
@@ -237,7 +237,7 @@ static void show_help(const char *name)
 
 static void show_version(void)
 {
-	const char *cli, *minigmp, *json, *xt, *ext_bsn_err;
+	const char *cli, *minigmp, *json, *xt;
 
 #if defined(HAVE_LIBREADLINE)
 	cli = "readline";
@@ -266,16 +266,13 @@ static void show_version(void)
 #else
 	xt = "no";
 #endif
-	ext_bsn_err = nft_bison_have_extended_errors ? "yes" : "no";
-
 	printf("%s v%s (%s)\n"
-	       "  cli:				%s\n"
-	       "  json:				%s\n"
-	       "  minigmp:			%s\n"
-	       "  libxtables:			%s\n"
-	       "  extended parser errors:	%s\n",
+	       "  cli:		%s\n"
+	       "  json:		%s\n"
+	       "  minigmp:	%s\n"
+	       "  libxtables:	%s\n",
 	       PACKAGE_NAME, PACKAGE_VERSION, RELEASE_NAME,
-	       cli, json, minigmp, xt, ext_bsn_err);
+	       cli, json, minigmp, xt);
 
 }
 
src/parser_bison.y +0 -4
index 3967993472960..c63007321e339 100644
@@ -6677,8 +6677,4 @@ yyreport_syntax_error(const yypcontext_t *yyctx, struct nft_ctx *nft,
 	return 0;
 }
 
-bool nft_bison_have_extended_errors = true;
-#else /* ! YY_LAC_ESTABLISH */
-bool nft_bison_have_extended_errors = false;
 #endif /* YY_LAC_ESTABLISH */
-EXPORT_SYMBOL(nft_bison_have_extended_errors);
Signature · 1 line
2.54.0
maintainer Applied
#2 lore raw
Quoted 9 lines · Pablo Neira Ayuso
Quoted 6 lines · Phil Sutter

It was merely used to indicate extended parser error support in 'nft --version' output. Not worth bumping library version just for that, so drop it again.

Fixes b315dd551dd96 ("parser_bison: Fix for bison < 3.6")

I have applied this patch to nftables.git to prepare for the nftables release.

author reviewer
#3 lore raw
Quoted 6 lines · Pablo Neira Ayuso
Quoted 5 lines · Pablo Neira Ayuso
Quoted 4 lines · Phil Sutter

It was merely used to indicate extended parser error support in 'nft --version' output. Not worth bumping library version just for that, so drop it again.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Fixes b315dd551dd96 ("parser_bison: Fix for bison < 3.6")

I have applied this patch to nftables.git to prepare for the nftables release.

Thanks, Pablo!