]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
bin/dnssec: move a little boilerplate into shared code
authorTony Finch <dot@dotat.at>
Tue, 29 Jan 2019 16:43:54 +0000 (16:43 +0000)
committerEvan Hunt <each@isc.org>
Thu, 9 May 2019 01:17:55 +0000 (18:17 -0700)
bin/dnssec/dnssec-cds.c
bin/dnssec/dnssec-dsfromkey.c
bin/dnssec/dnssec-importkey.c
bin/dnssec/dnssec-keyfromlabel.c
bin/dnssec/dnssec-keygen.c
bin/dnssec/dnssec-revoke.c
bin/dnssec/dnssec-settime.c
bin/dnssec/dnssec-signzone.c
bin/dnssec/dnssec-verify.c
bin/dnssec/dnssectool.c
bin/dnssec/dnssectool.h

index dfbc327affac25e8963d4846a63b4b4a8a799d9b..198ebcf959a23480458054e548c2aa0ee753ea82 100644 (file)
 
 #include "dnssectool.h"
 
-#ifndef PATH_MAX
-#define PATH_MAX 1024   /* WIN32, and others don't define this. */
-#endif
-
 const char *program = "dnssec-cds";
-int verbose;
 
 /*
  * Infrastructure
index 8aecb5f477f0762eae9a910f0ddbab2fecc8778a..1fdded5ebb5a97ca4fc2d5338f3885fb3600292a 100644 (file)
 
 #include "dnssectool.h"
 
-#ifndef PATH_MAX
-#define PATH_MAX 1024   /* WIN32, and others don't define this. */
-#endif
-
 const char *program = "dnssec-dsfromkey";
-int verbose;
 
 static dns_rdataclass_t rdclass;
 static dns_fixedname_t fixed;
index 195909f9ce7d8a10ab8be4e3df33ba04a1820004..494535bd10147c638bed69da11be5608ca421d9d 100644 (file)
 
 #include "dnssectool.h"
 
-#ifndef PATH_MAX
-#define PATH_MAX 1024   /* WIN32, and others don't define this. */
-#endif
-
 const char *program = "dnssec-importkey";
-int verbose;
 
 static dns_rdataclass_t rdclass;
 static dns_fixedname_t fixed;
index 741c047450180faa3150b98dbeef637f42332d17..ea156c76774c9cffa57b0bedbcc2b65e61adb3ab 100644 (file)
@@ -46,7 +46,6 @@
 #define MAX_RSA 4096 /* should be long enough... */
 
 const char *program = "dnssec-keyfromlabel";
-int verbose;
 
 ISC_PLATFORM_NORETURN_PRE static void
 usage(void) ISC_PLATFORM_NORETURN_POST;
index 203f1507a758a190b4886f0f05692ba926bd463f..aae310341da037ed5a038483e5adf92093a8d3df 100644 (file)
@@ -61,7 +61,6 @@
 #define MAX_RSA 4096 /* should be long enough... */
 
 const char *program = "dnssec-keygen";
-int verbose;
 
 ISC_PLATFORM_NORETURN_PRE static void
 usage(void) ISC_PLATFORM_NORETURN_POST;
index 17f158397a78e16235bbedd00cca11981d92e13d..6c8f38b5d72eb7055b3ccc0489136423efea848c 100644 (file)
@@ -37,7 +37,6 @@
 #include "dnssectool.h"
 
 const char *program = "dnssec-revoke";
-int verbose;
 
 static isc_mem_t       *mctx = NULL;
 
index ff49aea0becbd23a2a72d648087f0fb58455708e..f362162be3967b5f9d13433e15b9547c5173f160 100644 (file)
@@ -40,7 +40,6 @@
 #include "dnssectool.h"
 
 const char *program = "dnssec-settime";
-int verbose;
 
 static isc_mem_t       *mctx = NULL;
 
index da3bfb30314cade35847aa282b1afcf03058efa9..9530bfe4e6c95f6efd1268c41044f2afaf6c11cb 100644 (file)
 
 #include "dnssectool.h"
 
-#ifndef PATH_MAX
-#define PATH_MAX 1024   /* WIN32, and others don't define this. */
-#endif
-
 const char *program = "dnssec-signzone";
-int verbose;
 
 typedef struct hashlist hashlist_t;
 
index 2d14eb06605bb19a868da73fb02b491d69f91eb7..b38368b2dfea75d4113d3375fec3bb2260b860d9 100644 (file)
@@ -67,7 +67,6 @@
 #include "dnssectool.h"
 
 const char *program = "dnssec-verify";
-int verbose;
 
 static isc_stdtime_t now;
 static isc_mem_t *mctx = NULL;
index 81d9cc04d95f66e3e9bfc545b8b02d7f61e622e1..5cfd8e74d6b4bc428499abcca8b5b2b4dfd3f436 100644 (file)
@@ -57,8 +57,7 @@
 
 #include "dnssectool.h"
 
-extern int verbose;
-extern const char *program;
+int verbose;
 
 static fatalcallback_t *fatalcallback = NULL;
 
index aeae3a18b34c218a8d523941df5798f65a8190f8..16533669a63a51626790e525d5e27ed80f102d97 100644 (file)
 #include <dns/rdatastruct.h>
 #include <dst/dst.h>
 
+#ifndef PATH_MAX
+#define PATH_MAX 1024   /* WIN32, and others don't define this. */
+#endif
+
+/*! verbosity: set by -v option in each program, defined in dnssectool.c */
+extern int verbose;
+
+/*! program name, statically initialized in each program */
+extern const char *program;
+
 typedef void (fatalcallback_t)(void);
 
 ISC_PLATFORM_NORETURN_PRE void