From: Hannu Ylitalo Date: Thu, 14 Jul 2016 16:07:06 +0000 (+0300) Subject: pdnsutil: Remove checking of ctime and always diff the changes. Exit if no changes... X-Git-Tag: auth-4.0.1~15^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=708917340b5a81f1617d9c99195222b269ac7d95;p=thirdparty%2Fpdns.git pdnsutil: Remove checking of ctime and always diff the changes. Exit if no changes are found. --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index a56feb9067..5e44126f51 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -965,7 +965,6 @@ int editZone(DNSSECKeeper& dk, const DNSName &zone) { string d_name; } dm(tmpnam); - bool first=true; vector checkrr; int gotoline=0; string editor="editor"; @@ -999,8 +998,6 @@ int editZone(DNSSECKeeper& dk, const DNSName &zone) { tmpfd=-1; } editMore:; - struct stat statbefore, statafter; - stat(tmpnam,&statbefore); cmdline=editor+" "; if(gotoline > 0) cmdline+="+"+std::to_string(gotoline)+" "; @@ -1010,12 +1007,6 @@ int editZone(DNSSECKeeper& dk, const DNSName &zone) { unixDie("Editing file with: '"+cmdline+"', perhaps set EDITOR variable"); } cmdline.clear(); - stat(tmpnam,&statafter); - if(first && statbefore.st_ctime == statafter.st_ctime) { - cout<<"No change to file"<, vector > grouped; while(zpt.get(rr)) { @@ -1056,7 +1047,6 @@ int editZone(DNSSECKeeper& dk, const DNSName &zone) { goto reAsk; } - cout<<"Detected the following changes:\n"< diff; @@ -1076,16 +1066,17 @@ int editZone(DNSSECKeeper& dk, const DNSName &zone) { str<<'+'<< d.d_name <<" "<getZoneRepresentation(true)< 0) + cout<<"Detected the following changes:"<