From: Arvin Schnell Date: Mon, 7 Feb 2011 15:54:40 +0000 (+0100) Subject: - extended consistency checks X-Git-Tag: v0.1.3~507 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0dcdcdafb5c0b616a237886705cf40055d20524;p=thirdparty%2Fsnapper.git - extended consistency checks --- diff --git a/snapper/Snapshot.cc b/snapper/Snapshot.cc index d3c694cd..4b789059 100644 --- a/snapper/Snapshot.cc +++ b/snapper/Snapshot.cc @@ -151,18 +151,23 @@ namespace snapper if (i2->pre_num == i1->num) n++; if (n > 1) - y2err("num " << i1->num << " has " << n << " post-nums"); + y2err("pre-num " << i1->num << " has " << n << " post-nums"); } break; case POST: { if (i1->pre_num > i1->num) - y2err("pre-num " << i1->pre_num << " larger than num " << i1->num); + y2err("pre-num " << i1->pre_num << " larger than post-num " << i1->num); const_iterator i2 = find(i1->pre_num); if (i2 == end()) - y2err("pre-num " << i1->pre_num << " for num " << i1->num << " does not exist"); + y2err("pre-num " << i1->pre_num << " for post-num " << i1->num << + " does not exist"); + else + if (i2->type != PRE) + y2err("pre-num " << i1->pre_num << " for post-num " << i1->num << + " is of type " << toString(i2->type)); } break; }