From: Pieter Lexis Date: Fri, 29 Apr 2016 14:52:20 +0000 (+0200) Subject: make dnspcap spit out the filename on error X-Git-Tag: rec-4.0.0-alpha3~19^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27789befadfabca85017b8cb2a01d6237cace21d;p=thirdparty%2Fpdns.git make dnspcap spit out the filename on error --- diff --git a/pdns/dnspcap.cc b/pdns/dnspcap.cc index 3366e70a9a..d69244e829 100644 --- a/pdns/dnspcap.cc +++ b/pdns/dnspcap.cc @@ -11,7 +11,7 @@ PcapPacketReader::PcapPacketReader(const string& fname) : d_fname(fname) { d_fp=fopen(fname.c_str(),"r"); if(!d_fp) - unixDie("Unable to open file"); + unixDie("Unable to open file " + fname); int flags=fcntl(fileno(d_fp),F_GETFL,0); fcntl(fileno(d_fp), F_SETFL,flags&(~O_NONBLOCK)); // bsd needs this in stdin (??)