summaryrefslogtreecommitdiff
path: root/sbin/ipsecctl/parse.y
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-10-28 07:18:48 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-10-28 07:18:48 +0000
commit97159e2117ae33feb8fc7ee89990516e081faadc (patch)
tree9abe44a2438638e5d8d222c1af41cacb30daba43 /sbin/ipsecctl/parse.y
parentbbc49443762a896158d670db273e086896ef1fb2 (diff)
more error message cleanup
Diffstat (limited to 'sbin/ipsecctl/parse.y')
-rw-r--r--sbin/ipsecctl/parse.y10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y
index e70eb28c7df..72c44251029 100644
--- a/sbin/ipsecctl/parse.y
+++ b/sbin/ipsecctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.28 2005/10/16 21:41:36 hshoexer Exp $ */
+/* $OpenBSD: parse.y,v 1.29 2005/10/28 07:18:47 hshoexer Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -362,12 +362,12 @@ host : STRING {
ipa = calloc(1, sizeof(struct ipsec_addr));
if (ipa == NULL)
- err(1, "calloc");
+ err(1, "host: calloc");
ipa->af = AF_INET;
ipa->netaddress = 1;
if ((ipa->name = strdup("0.0.0.0/0")) == NULL)
- err(1, "strdup");
+ err(1, "host: strdup");
$$ = ipa;
}
;
@@ -977,7 +977,7 @@ parsekeyfile(char *filename)
if (stat(filename, &sb) < 0)
err(1, "parsekeyfile: stat %s", filename);
if ((sb.st_size > KEYSIZE_LIMIT) || (sb.st_size == 0))
- errx(1, "key too %s", sb.st_size ? "large" :
+ errx(1, "parsekeyfile: key too %s", sb.st_size ? "large" :
"small");
if ((hex = calloc(sb.st_size, sizeof(unsigned char)))
== NULL)
@@ -1001,7 +1001,7 @@ host(const char *s)
if ((p = strrchr(s, '/')) != NULL) {
mask = strtol(p + 1, &q, 0);
if (!q || *q || mask > 32 || q == (p + 1))
- errx(1, "invalid netmask '%s'", p);
+ errx(1, "host: invalid netmask '%s'", p);
if ((ps = malloc(strlen(s) - strlen(p) + 1)) == NULL)
err(1, "host: calloc");
strlcpy(ps, s, strlen(s) - strlen(p) + 1);