mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
Merge branch '3189-version-stdout' into 'main'
Consistently print version numbers to stdout Closes #3189 See merge request isc-projects/bind9!5940
This commit is contained in:
commit
1c77f55dc6
5
CHANGES
5
CHANGES
@ -1,3 +1,8 @@
|
||||
5827. [cleanup] The command-line utilities printed their version numbers
|
||||
inconsistently; they all now print to stdout. (They are
|
||||
still inconsistent abotut whether you use `-v` or `-V`
|
||||
to request the version). [GL #3189]
|
||||
|
||||
5826. [cleanup] Stop dig from complaining about lack of IDN support when
|
||||
the user asks for no IDN translation. [GL #3188]
|
||||
|
||||
|
@ -1334,7 +1334,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
||||
/* handled in preparse_args() */
|
||||
break;
|
||||
case 'v':
|
||||
fprintf(stderr, "delv %s\n", PACKAGE_VERSION);
|
||||
printf("delv %s\n", PACKAGE_VERSION);
|
||||
exit(0);
|
||||
/* NOTREACHED */
|
||||
default:
|
||||
|
@ -125,12 +125,6 @@ usage(void) {
|
||||
}
|
||||
#endif /* if TARGET_OS_IPHONE */
|
||||
|
||||
/*% version */
|
||||
static void
|
||||
version(void) {
|
||||
fprintf(stderr, "DiG %s\n", PACKAGE_VERSION);
|
||||
}
|
||||
|
||||
/*% help */
|
||||
static void
|
||||
help(void) {
|
||||
@ -2164,7 +2158,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
(*lookup)->use_usec = true;
|
||||
break;
|
||||
case 'v':
|
||||
version();
|
||||
printf("DiG %s\n", PACKAGE_VERSION);
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
|
@ -584,12 +584,6 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
|
||||
|
||||
static const char *optstring = "46aAc:dilnm:p:rst:vVwCDN:R:TUW:";
|
||||
|
||||
/*% version */
|
||||
static void
|
||||
version(void) {
|
||||
fprintf(stderr, "host %s\n", PACKAGE_VERSION);
|
||||
}
|
||||
|
||||
static void
|
||||
pre_parse_args(int argc, char **argv) {
|
||||
int c;
|
||||
@ -663,7 +657,7 @@ pre_parse_args(int argc, char **argv) {
|
||||
case 'v':
|
||||
break;
|
||||
case 'V':
|
||||
version();
|
||||
printf("host %s\n", PACKAGE_VERSION);
|
||||
exit(0);
|
||||
break;
|
||||
case 'w':
|
||||
|
@ -612,11 +612,6 @@ set_ndots(const char *value) {
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
version(void) {
|
||||
fprintf(stderr, "nslookup %s\n", PACKAGE_VERSION);
|
||||
}
|
||||
|
||||
static void
|
||||
setoption(char *opt) {
|
||||
size_t l = strlen(opt);
|
||||
@ -880,7 +875,7 @@ parse_args(int argc, char **argv) {
|
||||
debug("main parsing %s", argv[0]);
|
||||
if (argv[0][0] == '-') {
|
||||
if (strncasecmp(argv[0], "-ver", 4) == 0) {
|
||||
version();
|
||||
printf("nslookup %s\n", PACKAGE_VERSION);
|
||||
exit(0);
|
||||
} else if (argv[0][1] != 0) {
|
||||
setoption(&argv[0][1]);
|
||||
|
@ -3189,7 +3189,7 @@ print_version(FILE *fp) {
|
||||
return;
|
||||
}
|
||||
|
||||
fprintf(fp, "; dnssec_signzone version %s\n", PACKAGE_VERSION);
|
||||
fprintf(fp, "; %s version %s\n", program, PACKAGE_VERSION);
|
||||
}
|
||||
|
||||
ISC_NORETURN static void
|
||||
|
@ -111,7 +111,7 @@ vbprintf(int level, const char *fmt, ...) {
|
||||
|
||||
void
|
||||
version(const char *name) {
|
||||
fprintf(stderr, "%s %s\n", name, PACKAGE_VERSION);
|
||||
printf("%s %s\n", name, PACKAGE_VERSION);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@ -976,11 +976,6 @@ get_addresses(char *host, in_port_t port, isc_sockaddr_t *sockaddr,
|
||||
return (count);
|
||||
}
|
||||
|
||||
static void
|
||||
version(void) {
|
||||
fprintf(stderr, "nsupdate %s\n", PACKAGE_VERSION);
|
||||
}
|
||||
|
||||
#define PARSE_ARGS_FMT "46C:dDghilL:Mok:p:Pr:R:t:Tu:vVy:"
|
||||
|
||||
static void
|
||||
@ -1055,7 +1050,7 @@ pre_parse_args(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
version();
|
||||
printf("nsupdate %s\n", PACKAGE_VERSION);
|
||||
doexit = true;
|
||||
break;
|
||||
|
||||
|
@ -1726,7 +1726,7 @@ dash_option(const char *option, char *next, struct query *query, bool global,
|
||||
*/
|
||||
break;
|
||||
case 'v':
|
||||
fprintf(stderr, "mDiG %s\n", PACKAGE_VERSION);
|
||||
printf("mDiG %s\n", PACKAGE_VERSION);
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user