-/* $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. */
parse_semi(cfile);
break;
default:
- parse_warn("expecting a statement.");
+ parse_warn("expecting statement.");
if (token != ';')
skip_to_semi(cfile);
break;
skip_to_semi(cfile);
return (-1);
} else {
- parse_warn("expecting hex octet.");
+ parse_warn("expecting hex value.");
skip_to_semi(cfile);
return (-1);
}
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);
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;
token = next_token(&val, cfile);
if (token != '{') {
- parse_warn("expecting left brace.");
+ parse_warn("expecting '{'.");
if (token != ';')
skip_to_semi(cfile);
return;
token = next_token(NULL, cfile);
if (token != '{') {
- parse_warn("expecting left brace.");
+ parse_warn("expecting '{'.");
if (token != ';')
skip_to_semi(cfile);
return;
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;
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);
-/* $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. */
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);
}
if (!len) {
- parse_warn("expecting CIDR subnet.");
+ parse_warn("expecting decimal value.");
skip_to_semi(cfile);
return (0);
} else if (token != '/') {
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);
}
skip_to_semi(cfile);
return (0);
} else {
- parse_warn("expecting decimal octet.");
+ parse_warn("expecting decimal value.");
skip_to_semi(cfile);
return (0);
}
parse_warn("expecting ':'.");
skip_to_semi(cfile);
} else {
- parse_warn("expecting hex octet.");
+ parse_warn("expecting hex value.");
skip_to_semi(cfile);
}
}