summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/bpf.c4
-rw-r--r--sbin/dhclient/clparse.c6
-rw-r--r--sbin/dhclient/dhclient.c26
-rw-r--r--sbin/dhclient/dhcpd.h4
-rw-r--r--sbin/dhclient/dispatch.c6
-rw-r--r--sbin/dhclient/errwarn.c4
-rw-r--r--sbin/dhclient/hash.c4
-rw-r--r--sbin/dhclient/options.c26
-rw-r--r--sbin/dhclient/parse.c16
-rw-r--r--sbin/dhclient/tree.c12
10 files changed, 54 insertions, 54 deletions
diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c
index b906849e3da..886e988ce4e 100644
--- a/sbin/dhclient/bpf.c
+++ b/sbin/dhclient/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.11 2004/05/04 18:58:50 deraadt Exp $ */
+/* $OpenBSD: bpf.c,v 1.12 2004/05/04 22:23:01 mickey Exp $ */
/* BPF socket interface code, originally contributed by Archie Cobbs. */
@@ -203,7 +203,7 @@ send_packet(struct interface_info *interface, struct dhcp_packet *raw,
result = writev(interface->wfdesc, iov, 2);
if (result < 0)
- warn("send_packet: %m");
+ warning("send_packet: %m");
return (result);
}
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c
index 248d71d073a..d033d60a537 100644
--- a/sbin/dhclient/clparse.c
+++ b/sbin/dhclient/clparse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clparse.c,v 1.13 2004/05/04 18:58:50 deraadt Exp $ */
+/* $OpenBSD: clparse.c,v 1.14 2004/05/04 22:23:01 mickey Exp $ */
/* Parser for dhclient config and lease files... */
@@ -155,7 +155,7 @@ read_client_leases(void)
if (token == EOF)
break;
if (token != LEASE) {
- warn("Corrupt lease file - possible data loss!");
+ warning("Corrupt lease file - possible data loss!");
skip_to_semi(cfile);
break;
} else
@@ -837,7 +837,7 @@ bad_flag:
dp = buf;
goto alloc;
default:
- warn("Bad format %c in parse_option_param.",
+ warning("Bad format %c in parse_option_param.",
*fmt);
skip_to_semi(cfile);
return (NULL);
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 9fcf55b6728..0e08866bf70 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.40 2004/05/04 20:28:40 deraadt Exp $ */
+/* $OpenBSD: dhclient.c,v 1.41 2004/05/04 22:23:01 mickey Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -852,7 +852,7 @@ packet_to_lease(struct packet *packet)
lease = malloc(sizeof(struct client_lease));
if (!lease) {
- warn("dhcpoffer: no memory to record lease.");
+ warning("dhcpoffer: no memory to record lease.");
return (NULL);
}
@@ -864,7 +864,7 @@ packet_to_lease(struct packet *packet)
lease->options[i].data =
malloc(packet->options[i].len + 1);
if (!lease->options[i].data) {
- warn("dhcpoffer: no memory for option %d", i);
+ warning("dhcpoffer: no memory for option %d", i);
free_client_lease(lease);
return (NULL);
} else {
@@ -878,7 +878,7 @@ packet_to_lease(struct packet *packet)
}
if (!check_option(lease,i)) {
/* ignore a bogus lease offer */
- warn("Invalid lease option - ignoring offer");
+ warning("Invalid lease option - ignoring offer");
free_client_lease(lease);
return (NULL);
}
@@ -894,14 +894,14 @@ packet_to_lease(struct packet *packet)
packet->raw->sname[0]) {
lease->server_name = malloc(DHCP_SNAME_LEN + 1);
if (!lease->server_name) {
- warn("dhcpoffer: no memory for server name.");
+ warning("dhcpoffer: no memory for server name.");
free_client_lease(lease);
return (NULL);
}
memcpy(lease->server_name, packet->raw->sname, DHCP_SNAME_LEN);
lease->server_name[DHCP_SNAME_LEN]='\0';
if (!res_hnok(lease->server_name) ) {
- warn("Bogus server name %s", lease->server_name );
+ warning("Bogus server name %s", lease->server_name );
free_client_lease(lease);
return (NULL);
}
@@ -915,7 +915,7 @@ packet_to_lease(struct packet *packet)
/* Don't count on the NUL terminator. */
lease->filename = malloc(DHCP_FILE_LEN + 1);
if (!lease->filename) {
- warn("dhcpoffer: no memory for filename.");
+ warning("dhcpoffer: no memory for filename.");
free_client_lease(lease);
return (NULL);
}
@@ -1803,7 +1803,7 @@ supersede:
config->defaults[i].len +
lease->options[i].len;
if (len > sizeof(dbuf)) {
- warn("no space to %s %s",
+ warning("no space to %s %s",
"prepend option",
dhcp_options[i].name);
goto supersede;
@@ -1825,7 +1825,7 @@ supersede:
config->defaults[i].len +
lease->options[i].len;
if (len > sizeof(dbuf)) {
- warn("no space to %s %s",
+ warning("no space to %s %s",
"append option",
dhcp_options[i].name);
goto supersede;
@@ -2123,7 +2123,7 @@ check_option(struct client_lease *l, int option)
case DHO_FONT_SERVERS :
case DHO_DHCP_SERVER_IDENTIFIER :
if (!ipv4addrs(opbuf)) {
- warn("Invalid IP address in option: %s", opbuf);
+ warning("Invalid IP address in option: %s", opbuf);
return (0);
}
return (1) ;
@@ -2131,7 +2131,7 @@ check_option(struct client_lease *l, int option)
case DHO_DOMAIN_NAME :
case DHO_NIS_DOMAIN :
if (!res_hnok(sbuf)) {
- warn("Bogus Host Name option %d: %s (%s)", option,
+ warning("Bogus Host Name option %d: %s (%s)", option,
sbuf, opbuf);
return (0);
}
@@ -2181,7 +2181,7 @@ check_option(struct client_lease *l, int option)
case DHO_END :
return (1);
default:
- warn("unknown dhcp option value 0x%x", option);
+ warning("unknown dhcp option value 0x%x", option);
return (unknown_ok);
}
}
@@ -2273,7 +2273,7 @@ option_as_string(unsigned int code, unsigned char *data, int len)
*op = 0;
return optbuf;
toobig:
- warn("dhcp option too large");
+ warning("dhcp option too large");
return "<error>";
}
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h
index f5dc9079735..4c136179c92 100644
--- a/sbin/dhclient/dhcpd.h
+++ b/sbin/dhclient/dhcpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpd.h,v 1.31 2004/05/04 20:28:40 deraadt Exp $ */
+/* $OpenBSD: dhcpd.h,v 1.32 2004/05/04 22:23:01 mickey Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -256,7 +256,7 @@ void do_packet(struct interface_info *, struct dhcp_packet *,
/* errwarn.c */
extern int warnings_occurred;
void error(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
-int warn(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
+int warning(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
int note(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
int debug(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
int parse_warn(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c
index acfb08f0998..0465ae8d7ba 100644
--- a/sbin/dhclient/dispatch.c
+++ b/sbin/dhclient/dispatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dispatch.c,v 1.26 2004/05/04 21:48:16 deraadt Exp $ */
+/* $OpenBSD: dispatch.c,v 1.27 2004/05/04 22:23:01 mickey Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -252,13 +252,13 @@ got_one(struct protocol *l)
if ((result = receive_packet(ip, u.packbuf, sizeof(u), &from,
&hfrom)) == -1) {
- warn("receive_packet failed on %s: %s", ip->name,
+ warning("receive_packet failed on %s: %s", ip->name,
strerror(errno));
ip->errors++;
if ((!interface_status(ip)) ||
(ip->noifmedia && ip->errors > 20)) {
/* our interface has gone away. */
- warn("Interface %s no longer appears valid.",
+ warning("Interface %s no longer appears valid.",
ip->name);
ip->dead = 1;
interfaces_invalidated = 1;
diff --git a/sbin/dhclient/errwarn.c b/sbin/dhclient/errwarn.c
index 005ea5976f6..03b75478457 100644
--- a/sbin/dhclient/errwarn.c
+++ b/sbin/dhclient/errwarn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: errwarn.c,v 1.6 2004/03/05 23:57:16 deraadt Exp $ */
+/* $OpenBSD: errwarn.c,v 1.7 2004/05/04 22:23:01 mickey Exp $ */
/* Errors and warnings... */
@@ -87,7 +87,7 @@ error(char *fmt, ...)
* Log a warning message...
*/
int
-warn(char *fmt, ...)
+warning(char *fmt, ...)
{
va_list list;
diff --git a/sbin/dhclient/hash.c b/sbin/dhclient/hash.c
index 357370818c7..e570c73db31 100644
--- a/sbin/dhclient/hash.c
+++ b/sbin/dhclient/hash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hash.c,v 1.7 2004/05/04 20:28:40 deraadt Exp $ */
+/* $OpenBSD: hash.c,v 1.8 2004/05/04 22:23:01 mickey Exp $ */
/* Routines for manipulating hash tables... */
@@ -87,7 +87,7 @@ void add_hash(struct hash_table *table, unsigned char *name, int len,
bp = new_hash_bucket();
if (!bp) {
- warn("Can't add %s to hash table.", name);
+ warning("Can't add %s to hash table.", name);
return;
}
bp->name = name;
diff --git a/sbin/dhclient/options.c b/sbin/dhclient/options.c
index cd3940ad343..e77d2215296 100644
--- a/sbin/dhclient/options.c
+++ b/sbin/dhclient/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.9 2004/05/04 20:28:40 deraadt Exp $ */
+/* $OpenBSD: options.c,v 1.10 2004/05/04 22:23:01 mickey Exp $ */
/* DHCP options parsing and reassembly. */
@@ -135,17 +135,17 @@ parse_option_buffer(struct packet *packet,
if (s + len + 2 > end) {
bogus:
bad_options++;
- warn("option %s (%d) %s.",
+ warning("option %s (%d) %s.",
dhcp_options[code].name, len,
"larger than buffer");
if (bad_options == bad_options_max) {
packet->options_valid = 1;
bad_options = 0;
- warn("Many bogus options seen in offers.");
- warn("Taking this offer in spite of bogus");
- warn("options - hope for the best!");
+ warning("Many bogus options seen in offers. "
+ "Taking this offer in spite of bogus "
+ "options - hope for the best!");
} else {
- warn("rejecting bogus offer.");
+ warning("rejecting bogus offer.");
packet->options_valid = 0;
}
return;
@@ -472,7 +472,7 @@ pretty_print_option(unsigned int code, unsigned char *data, int len,
/* Figure out the size of the data. */
for (i = 0; dhcp_options[code].format[i]; i++) {
if (!numhunk) {
- warn("%s: Excess information in format string: %s",
+ warning("%s: Excess information in format string: %s",
dhcp_options[code].name,
&(dhcp_options[code].format[i]));
break;
@@ -523,7 +523,7 @@ pretty_print_option(unsigned int code, unsigned char *data, int len,
case 'e':
break;
default:
- warn("%s: garbage in format string: %s",
+ warning("%s: garbage in format string: %s",
dhcp_options[code].name,
&(dhcp_options[code].format[i]));
break;
@@ -532,13 +532,13 @@ pretty_print_option(unsigned int code, unsigned char *data, int len,
/* Check for too few bytes... */
if (hunksize > len) {
- warn("%s: expecting at least %d bytes; got %d",
+ warning("%s: expecting at least %d bytes; got %d",
dhcp_options[code].name, hunksize, len);
return ("<error>");
}
/* Check for too many bytes... */
if (numhunk == -1 && hunksize < len)
- warn("%s: %d extra bytes",
+ warning("%s: %d extra bytes",
dhcp_options[code].name, len - hunksize);
/* If this is an array, compute its size. */
@@ -546,7 +546,7 @@ pretty_print_option(unsigned int code, unsigned char *data, int len,
numhunk = len / hunksize;
/* See if we got an exact number of hunks. */
if (numhunk > 0 && numhunk * hunksize < len)
- warn("%s: %d extra bytes at end of array",
+ warning("%s: %d extra bytes at end of array",
dhcp_options[code].name, len - numhunk * hunksize);
/* A one-hunk array prints the same as a single hunk. */
@@ -660,7 +660,7 @@ pretty_print_option(unsigned int code, unsigned char *data, int len,
opleft -= opcount;
break;
default:
- warn("Unexpected format code %c", fmtbuf[j]);
+ warning("Unexpected format code %c", fmtbuf[j]);
}
op += strlen(op);
opleft -= strlen(op);
@@ -681,7 +681,7 @@ pretty_print_option(unsigned int code, unsigned char *data, int len,
}
return (optbuf);
toobig:
- warn("dhcp option too large");
+ warning("dhcp option too large");
return ("<error>");
}
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index 21a2116d8e2..1c7bd2f1152 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.9 2004/05/04 21:48:16 deraadt Exp $ */
+/* $OpenBSD: parse.c,v 1.10 2004/05/04 22:23:01 mickey Exp $ */
/* Common parser code for dhcpd and dhclient. */
@@ -352,11 +352,11 @@ convert_num(unsigned char *buf, char *str, int base, int size)
else if (tval >= '0')
tval -= '0';
else {
- warn("Bogus number: %s.", str);
+ warning("Bogus number: %s.", str);
break;
}
if (tval >= base) {
- warn("Bogus number: %s: digit %d not in base %d",
+ warning("Bogus number: %s: digit %d not in base %d",
str, tval, base);
break;
}
@@ -370,15 +370,15 @@ convert_num(unsigned char *buf, char *str, int base, int size)
if (val > max) {
switch (base) {
case 8:
- warn("value %s%o exceeds max (%d) for precision.",
+ warning("value %s%o exceeds max (%d) for precision.",
negative ? "-" : "", val, max);
break;
case 16:
- warn("value %s%x exceeds max (%d) for precision.",
+ warning("value %s%x exceeds max (%d) for precision.",
negative ? "-" : "", val, max);
break;
default:
- warn("value %s%u exceeds max (%d) for precision.",
+ warning("value %s%u exceeds max (%d) for precision.",
negative ? "-" : "", val, max);
break;
}
@@ -396,7 +396,7 @@ convert_num(unsigned char *buf, char *str, int base, int size)
putLong(buf, -(unsigned long)val);
break;
default:
- warn("Unexpected integer size: %d", size);
+ warning("Unexpected integer size: %d", size);
break;
}
else
@@ -411,7 +411,7 @@ convert_num(unsigned char *buf, char *str, int base, int size)
putULong(buf, val);
break;
default:
- warn("Unexpected integer size: %d", size);
+ warning("Unexpected integer size: %d", size);
break;
}
}
diff --git a/sbin/dhclient/tree.c b/sbin/dhclient/tree.c
index 58b6694f387..d812996dfb2 100644
--- a/sbin/dhclient/tree.c
+++ b/sbin/dhclient/tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tree.c,v 1.11 2004/05/04 20:28:40 deraadt Exp $ */
+/* $OpenBSD: tree.c,v 1.12 2004/05/04 22:23:01 mickey Exp $ */
/* Routines for manipulating parse trees... */
@@ -151,7 +151,7 @@ tree_evaluate_recurse(int *bufix, unsigned char **bufp, int *bufcount,
return (t1);
default:
- warn("Bad node id in tree: %d.", tree->op);
+ warning("Bad node id in tree: %d.", tree->op);
t1 = MAX_TIME;
return (t1);
}
@@ -177,17 +177,17 @@ do_host_lookup(int *bufix, unsigned char **bufp, int *bufcount,
if (h == NULL) {
switch (h_errno) {
case HOST_NOT_FOUND:
- warn("%s: host unknown.", dns->hostname);
+ warning("%s: host unknown.", dns->hostname);
break;
case TRY_AGAIN:
- warn("%s: temporary name server failure",
+ warning("%s: temporary name server failure",
dns->hostname);
break;
case NO_RECOVERY:
- warn("%s: name server failed", dns->hostname);
+ warning("%s: name server failed", dns->hostname);
break;
case NO_DATA:
- warn("%s: no A record associated with address",
+ warning("%s: no A record associated with address",
dns->hostname);
}
/* Okay to try again after a minute. */