From: Ben Gras Date: Mon, 19 Sep 2005 14:46:01 +0000 (+0000) Subject: Save errors to dhcpd log. X-Git-Tag: v3.1.0~51 X-Git-Url: http://zhaoyanbai.com/repos/%22/xml/v3/net/static/gitweb.css?a=commitdiff_plain;h=e7b12578588e1fb584b8a5164d54745b49213f0a;p=minix.git Save errors to dhcpd log. --- diff --git a/commands/dhcpd/dhcpd.c b/commands/dhcpd/dhcpd.c index b83d696c3..129d9e716 100755 --- a/commands/dhcpd/dhcpd.c +++ b/commands/dhcpd/dhcpd.c @@ -47,7 +47,11 @@ static unsigned n_nets; /* Actual number of networks. */ void report(const char *label) { - fprintf(stderr, "%s: %s: %s\n", program, label, strerror(errno)); + static FILE *logfp; + if(!logfp) + logfp = fopen("/usr/log/dhcp.log", "w"); + if(logfp) + fprintf(logfp, "%s: %s: %s\n", program, label, strerror(errno)); } void fatal(const char *label)