Lines Matching defs:iterator
90 static int remove_attribute_records(struct hfsmount *hfsmp, BTreeIterator * iterator);
444 struct BTreeIterator * iterator = NULL;
469 /* Initialize the B-Tree iterator for searching for the proper EA */
472 MALLOC(iterator, BTreeIterator *, sizeof(*iterator), M_TEMP, M_WAITOK);
473 if (iterator == NULL) {
477 bzero(iterator, sizeof(*iterator));
493 result = hfs_buildattrkey(target_id, ap->a_name, (HFSPlusAttrKey *)&iterator->key);
500 result = BTSearchRecord(btfile, iterator, &btdata, &datasize, NULL);
591 ((HFSPlusAttrKey *)&iterator->key)->startBlock = blkcnt;
592 result = BTSearchRecord(btfile, iterator, &btdata, &datasize, NULL);
632 if (iterator) {
633 FREE(iterator, M_TEMP);
945 struct BTreeIterator * iterator = NULL;
1010 MALLOC(iterator, BTreeIterator *, sizeof(*iterator), M_TEMP, M_WAITOK);
1011 if (iterator == NULL) {
1015 bzero(iterator, sizeof(*iterator));
1016 result = hfs_buildattrkey(target_id, ap->a_name, (HFSPlusAttrKey *)&iterator->key);
1026 exists = BTSearchRecord(btfile, iterator, &btdata, NULL, NULL) == 0;
1087 result = remove_attribute_records(hfsmp, iterator);
1116 (void) hfs_buildattrkey(target_id, ap->a_name, (HFSPlusAttrKey *)&iterator->key);
1118 result = BTInsertRecord(btfile, iterator, &btdata, btdata.itemSize);
1126 keystartblk = &((HFSPlusAttrKey *)&iterator->key)->startBlock;
1141 result = BTInsertRecord(btfile, iterator, &btdata, btdata.itemSize);
1153 result = remove_attribute_records(hfsmp, iterator);
1193 (void) hfs_buildattrkey(target_id, ap->a_name, (HFSPlusAttrKey *)&iterator->key);
1197 result = BTInsertRecord(btfile, iterator, &btdata, btdata.itemSize);
1234 if (iterator) {
1235 FREE(iterator, M_TEMP);
1262 struct BTreeIterator * iterator = NULL;
1424 MALLOC(iterator, BTreeIterator *, sizeof(*iterator), M_TEMP, M_WAITOK);
1425 if (iterator == NULL) {
1428 bzero(iterator, sizeof(*iterator));
1434 result = hfs_buildattrkey(cp->c_fileid, ap->a_name, (HFSPlusAttrKey *)&iterator->key);
1445 result = remove_attribute_records(hfsmp, iterator);
1476 FREE(iterator, M_TEMP);
1496 struct BTreeIterator * iterator = NULL;
1506 MALLOC(iterator, BTreeIterator *, sizeof(*iterator), M_TEMP, M_WAITOK);
1507 if (iterator == NULL) {
1511 bzero(iterator, sizeof(*iterator));
1512 key = (HFSPlusAttrKey *)&iterator->key;
1520 result = BTSearchRecord(btfile, iterator, NULL, NULL, NULL);
1525 result = BTIterateRecord(btfile, kBTreeNextRecord, iterator, NULL, NULL);
1536 if (iterator) {
1537 FREE(iterator, M_TEMP);
1550 * - The iterator key must be initialized.
1553 remove_attribute_records(struct hfsmount *hfsmp, BTreeIterator * iterator)
1566 result = BTSearchRecord(btfile, iterator, &btdata, &datasize, NULL);
1590 if (BTDeleteRecord(btfile, iterator) == 0) {
1594 keystartblk = &((HFSPlusAttrKey *)&iterator->key)->startBlock;
1600 result = BTSearchRecord(btfile, iterator, &btdata, &datasize, NULL);
1613 if (BTDeleteRecord(btfile, iterator) == 0) {
1619 result = BTDeleteRecord(btfile, iterator);
1646 struct BTreeIterator * iterator = NULL;
1741 MALLOC(iterator, BTreeIterator *, sizeof(*iterator), M_TEMP, M_WAITOK);
1742 if (iterator == NULL) {
1746 bzero(iterator, sizeof(*iterator));
1747 result = hfs_buildattrkey(cp->c_fileid, NULL, (HFSPlusAttrKey *)&iterator->key);
1766 result = BTSearchRecord(btfile, iterator, NULL, NULL, NULL);
1783 * Process entries starting just after iterator->key.
1785 result = BTIterateRecords(btfile, kBTreeNextRecord, iterator,
1799 if (iterator) {
1800 FREE(iterator, M_TEMP);
1875 BTreeIterator *iterator = NULL;
1885 MALLOC(iterator, BTreeIterator *, sizeof(BTreeIterator), M_TEMP, M_WAITOK);
1886 if (iterator == NULL) {
1889 bzero(iterator, sizeof(BTreeIterator));
1890 key = (HFSPlusAttrKey *)&iterator->key;
1906 result = BTIterateRecord(btfile, kBTreeNextRecord, iterator, NULL, NULL);
1912 result = remove_attribute_records(hfsmp, iterator);
1925 FREE(iterator, M_TEMP);
1954 struct BTreeIterator * iterator = NULL;
1977 MALLOC(iterator, BTreeIterator *, sizeof(*iterator), M_TEMP, M_WAITOK);
1978 if (iterator == NULL) {
1981 bzero(iterator, sizeof(*iterator));
1988 (HFSPlusAttrKey *)&iterator->key);
2001 result = BTDeleteRecord(btfile, iterator);
2021 result = BTInsertRecord(btfile, iterator, &btdata, datasize);
2042 if (iterator) {
2043 FREE(iterator, M_TEMP);