Lines Matching refs:list
30 * Helper function for making a badblocks list
32 static errcode_t make_u32_list(int size, int num, __u32 *list,
45 retval = ext2fs_get_array(bb->size, sizeof(blk_t), &bb->list);
50 if (list)
51 memcpy(bb->list, list, bb->size * sizeof(blk_t));
53 memset(bb->list, 0, bb->size * sizeof(blk_t));
60 * This procedure creates an empty u32 list.
68 * This procedure creates an empty badblocks list.
77 * This procedure copies a badblocks list
83 retval = make_u32_list(src->size, src->num, src->list, dest);
98 * This procedure frees a badblocks list.
105 * This procedure adds a block to a badblocks list.
119 &bb->list);
127 * Add special case code for appending to the end of the list
130 if ((bb->num != 0) && (bb->list[i] == blk))
132 if ((bb->num == 0) || (bb->list[i] < blk)) {
133 bb->list[bb->num++] = blk;
139 if (bb->list[i] == blk)
141 if (bb->list[i] > blk) {
147 bb->list[i] = bb->list[i-1];
148 bb->list[j] = blk;
160 * list.
174 if (blk == bb->list[low])
176 if (blk == bb->list[high])
183 if (blk == bb->list[mid])
185 if (blk < bb->list[mid])
195 * list.
212 * Remove a block from the badblock list
226 bb->list[i] = bb->list[i+1];
276 *blk = bb->list[iter->ptr++];
313 if (memcmp(bb1->list, bb2->list, bb1->num * sizeof(blk_t)) != 0)