Lines Matching refs:block
96 /* Get the error info for an error number. Also returns the name of the error block, if known. */
99 struct error_block *block;
106 for (block = registered_errors.blocks;
107 block < registered_errors.blocks + registered_errors.count;
108 block++) {
109 if ((errnum >= block->base) && (errnum < block->last)) {
110 *info_ptr = block->infos + (errnum - block->base);
111 return block->name;
112 } else if ((errnum >= block->last) && (errnum < block->max)) {
114 return block->name;
262 * Register a block of error codes.
264 * @block_name: the name of the block of error codes
265 * @first_error: the first error code in the block
266 * @next_free_error: one past the highest possible error in the block
267 * @infos: a pointer to the error info array for the block
275 struct error_block *block;
285 "well-defined error block range");
294 for (block = registered_errors.blocks;
295 block < registered_errors.blocks + registered_errors.count;
296 block++) {
297 if (strcmp(block_name, block->name) == 0)
301 if ((first_error < block->max) && (next_free_error > block->base))