]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- extended consistency checks
authorArvin Schnell <aschnell@suse.de>
Mon, 7 Feb 2011 15:54:40 +0000 (16:54 +0100)
committerArvin Schnell <aschnell@suse.de>
Mon, 7 Feb 2011 15:54:40 +0000 (16:54 +0100)
snapper/Snapshot.cc

index d3c694cd75a91c39aa60011dfab669d97b1cd5a4..4b789059b5cfce727875984da210cac79d08e21d 100644 (file)
@@ -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;
            }