kernels/linux-2.4.0/drivers/s390/block/dasd.c
/* dasd_insert_range skips ranges, if the start or the end is -1 */
dasd_insert_range skips ranges, if the start or the end is -1
dasd_insert_range skips ranges if the start or the end is - 1
static void
dasd_insert_range (int start, int end)
{
	int curr;
	FUNCTION_ENTRY ("dasd_insert_range");
	if (dasd_count >= DASD_MAX_DEVICES) {
		PRINT_ERR (" too many devices specified, ignoring some.\n");
		FUNCTION_EXIT ("dasd_insert_range");
		return;
	}
	if ((start == -1) || (end == -1)) {
		PRINT_ERR
 ("invalid format of parameter, skipping range\n");
		FUNCTION_EXIT ("dasd_insert_range");
		return;
	}
	if (end < start) {
		PRINT_ERR (" ignoring range from %x to %x - start value " \
			   "must be less than end value.\n", start, end);
		FUNCTION_EXIT ("dasd_insert_range");
		return;
	}
	for (curr = start; curr <= end; curr++) {
		if (dasd_is_accessible (curr)) {
			PRINT_WARN (" %x is already in list as device %d\n",
				    curr, devindex_from_devno (curr));
		}
		dasd_devno[dasd_count] = curr;
		dasd_count++;
		if (dasd_count >= DASD_MAX_DEVICES) {
			PRINT_ERR (" too many devices specified, ignoring some.\n");
			break;
		}
	}
	PRINT_INFO (" added dasd range from %x to %x.\n",
		    start, dasd_devno[dasd_count - 1]);
	FUNCTION_EXIT ("dasd_insert_range");
}
static void dasd_insert_range ( int start , int end ) { int curr ; FUNCTION_ENTRY ( " " ) ; if ( dasd_count >= DASD_MAX_DEVICES ) { PRINT_ERR ( " \n " ) ; FUNCTION_EXIT ( " " ) ; return ; } if ( ( start == -1 ) || ( end == -1 ) ) { PRINT_ERR ( " \n " ) ; FUNCTION_EXIT ( " " ) ; return ; } if ( end < start ) { PRINT_ERR ( " " " \n " , start , end ) ; FUNCTION_EXIT ( " " ) ; return ; } for ( curr = start ; curr <= end ; curr ++ ) { if ( dasd_is_accessible ( curr ) ) { PRINT_WARN ( " \n " , curr , devindex_from_devno ( curr ) ) ; } dasd_devno [ dasd_count ] = curr ; dasd_count ++ ; if ( dasd_count >= DASD_MAX_DEVICES ) { PRINT_ERR ( " \n " ) ; break ; } } PRINT_INFO ( " \n " , start , dasd_devno [ dasd_count - 1 ] ) ; FUNCTION_EXIT ( " " ) ; }
dasd_insert_range skips ranges, if the start or the end is -1
dasd_insert_range skips ranges if the start or the end is - 1
/* concurrent execution would be critical, but will not occur here */