summaryrefslogtreecommitdiff
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-04-03 14:16:35 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-04-03 14:16:35 +0000
commite75d6c2e242936d01fc01dc63ff8bb130b16d5b4 (patch)
tree49a2f67ec14a5954aad4ff510c2b1b2bc86a11bf /sbin/dhclient
parentc6b190d565812f0f6603442ddee93dc765d93c14 (diff)
Tweak 'expecting' parse_warn() messages to be more consistent.
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/clparse.c18
-rw-r--r--sbin/dhclient/parse.c12
2 files changed, 15 insertions, 15 deletions
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c
index 1281a326ac2..ea122a66c50 100644
--- a/sbin/dhclient/clparse.c
+++ b/sbin/dhclient/clparse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clparse.c,v 1.105 2017/02/12 13:55:01 krw Exp $ */
+/* $OpenBSD: clparse.c,v 1.106 2017/04/03 14:16:34 krw Exp $ */
/* Parser for dhclient config and lease files. */
@@ -296,7 +296,7 @@ parse_client_statement(FILE *cfile, struct interface_info *ifi)
parse_semi(cfile);
break;
default:
- parse_warn("expecting a statement.");
+ parse_warn("expecting statement.");
if (token != ';')
skip_to_semi(cfile);
break;
@@ -327,7 +327,7 @@ parse_X(FILE *cfile, u_int8_t *buf, int max)
skip_to_semi(cfile);
return (-1);
} else {
- parse_warn("expecting hex octet.");
+ parse_warn("expecting hex value.");
skip_to_semi(cfile);
return (-1);
}
@@ -342,7 +342,7 @@ parse_X(FILE *cfile, u_int8_t *buf, int max)
memcpy(buf, val, len + 1);
} else {
token = next_token(NULL, cfile);
- parse_warn("expecting string or hexadecimal data");
+ parse_warn("expecting string or hex data.");
if (token != ';')
skip_to_semi(cfile);
return (-1);
@@ -421,7 +421,7 @@ parse_interface_declaration(FILE *cfile, struct interface_info *ifi)
token = next_token(&val, cfile);
if (token != TOK_STRING) {
- parse_warn("expecting interface name (in quotes).");
+ parse_warn("expecting string.");
if (token != ';')
skip_to_semi(cfile);
return;
@@ -434,7 +434,7 @@ parse_interface_declaration(FILE *cfile, struct interface_info *ifi)
token = next_token(&val, cfile);
if (token != '{') {
- parse_warn("expecting left brace.");
+ parse_warn("expecting '{'.");
if (token != ';')
skip_to_semi(cfile);
return;
@@ -472,7 +472,7 @@ parse_client_lease_statement(FILE *cfile, int is_static,
token = next_token(NULL, cfile);
if (token != '{') {
- parse_warn("expecting left brace.");
+ parse_warn("expecting '{'.");
if (token != ';')
skip_to_semi(cfile);
return;
@@ -560,7 +560,7 @@ parse_client_lease_declaration(FILE *cfile, struct client_lease *lease,
case TOK_INTERFACE:
token = next_token(&val, cfile);
if (token != TOK_STRING) {
- parse_warn("expecting interface name (in quotes).");
+ parse_warn("expecting string.");
if (token != ';')
skip_to_semi(cfile);
return;
@@ -634,7 +634,7 @@ parse_option_decl(FILE *cfile, struct option_data *options)
token = next_token(&val, cfile);
if (!is_identifier(token)) {
- parse_warn("expecting identifier after option keyword.");
+ parse_warn("expecting identifier.");
if (token != ';')
skip_to_semi(cfile);
return (-1);
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index 847c0051aaa..c3e7643783f 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.44 2017/04/02 20:57:22 krw Exp $ */
+/* $OpenBSD: parse.c,v 1.45 2017/04/03 14:16:34 krw Exp $ */
/* Common parser code for dhcpd and dhclient. */
@@ -138,7 +138,7 @@ parse_string(FILE *cfile)
token = next_token(&val, cfile);
if (token != TOK_STRING) {
- parse_warn("expecting a string");
+ parse_warn("expecting string.");
if (token != ';')
skip_to_semi(cfile);
return (NULL);
@@ -177,7 +177,7 @@ parse_cidr(FILE *cfile, unsigned char *cidr)
}
if (!len) {
- parse_warn("expecting CIDR subnet.");
+ parse_warn("expecting decimal value.");
skip_to_semi(cfile);
return (0);
} else if (token != '/') {
@@ -185,7 +185,7 @@ parse_cidr(FILE *cfile, unsigned char *cidr)
skip_to_semi(cfile);
return (0);
} else if (!parse_decimal(cfile, cidr, 'B') || *cidr > 32) {
- parse_warn("Expecting CIDR prefix length.");
+ parse_warn("expecting decimal value <= 32.");
skip_to_semi(cfile);
return (0);
}
@@ -216,7 +216,7 @@ parse_ip_addr(FILE *cfile, struct in_addr *addr)
skip_to_semi(cfile);
return (0);
} else {
- parse_warn("expecting decimal octet.");
+ parse_warn("expecting decimal value.");
skip_to_semi(cfile);
return (0);
}
@@ -254,7 +254,7 @@ parse_ethernet(FILE *cfile, struct ether_addr *hardware)
parse_warn("expecting ':'.");
skip_to_semi(cfile);
} else {
- parse_warn("expecting hex octet.");
+ parse_warn("expecting hex value.");
skip_to_semi(cfile);
}
}