diff --git a/src/sys/ubixfsv2/btree.cpp b/src/sys/ubixfsv2/btree.cpp index df5e73f..bfd2ce3 100644 --- a/src/sys/ubixfsv2/btree.cpp +++ b/src/sys/ubixfsv2/btree.cpp @@ -126,15 +126,26 @@ bnode->childHead[curSlot] = (void *)inode; if (foo != Verify()) cout << "verify 4b failed" << endl; } else { - if (strcmp(inode->name, ((ubixfsInode *)bnode->childTail[curSlot])->name) > 0) { if (foo != Verify()) cout << "verify 4c failed" << endl; + if (strcmp(inode->name, ((ubixfsInode *)bnode->childTail[curSlot])->name) > 0) { +if (foo != Verify()) { + cout << "verify 4d failed" << endl; + Info(bnode); +} + cout << "node->CT[curSlot]->name == " << ((ubixfsInode *)bnode->childTail[curSlot])->name << endl; + ubixfsInode * tmp = (ubixfsInode *)bnode->childTail[curSlot]; + if (tmp != NULL && tmp->next != NULL) cout << tmp->next->name << endl; inode->prev = (ubixfsInode *)bnode->childTail[curSlot]; inode->next = inode->prev->next; inode->prev->next = inode; if (inode->next != NULL) inode->next->prev = inode; bnode->childTail[curSlot] = inode; +if (foo != Verify()) { + Info(bnode); + cout << "verify 4e failed" << endl; + cout << "was inserting " << inode->name << " at end of list" << endl; -if (foo != Verify()) cout << "verify 4d failed" << endl; +} } else { ubixfsInode * tmpInode = (ubixfsInode *)bnode->childHead[curSlot]; diff --git a/src/sys/ubixfsv2/main.cpp b/src/sys/ubixfsv2/main.cpp index 9001135..f0e1202 100644 --- a/src/sys/ubixfsv2/main.cpp +++ b/src/sys/ubixfsv2/main.cpp @@ -16,7 +16,7 @@ strcpy(inode -> name, "temp123"); bTree * tree = new bTree(inode); - for (i = 0; i < 1000; i++) { + for (i = 0; i < 2000; i++) { // if (i%1000 == 0) cout << "-_- i = "<