kernels/linux-2.4.0/drivers/block/cciss.c
/*  
 * fills in the disk information. 
 */
fills in the disk information.
fills in the disk information .
static void cciss_geninit( int ctlr)
{
	drive_info_struct *drv;
	int i,j;
	hba[ctlr]->gendisk.nr_real = 0; 
	for(i=0; i< NWD; i++)
	{
		drv = &(hba[ctlr]->drv[i]);
		if( !(drv->nr_blocks))
			continue;
		hba[ctlr]->hd[i << NWD_SHIFT].nr_sects = 
		hba[ctlr]->sizes[i << NWD_SHIFT] = drv->nr_blocks;
		for(j=0; j<MAX_PART; j++)
		{
			hba[ctlr]->blocksizes[(i<<NWD_SHIFT) + j] = 1024; 
			hba[ctlr]->hardsizes[ (i<<NWD_SHIFT) + j] = 
				drv->block_size;
		}
		hba[ctlr]->gendisk.nr_real++;
	}
}
static void cciss_geninit ( int ctlr ) { drive_info_struct * drv ; int i , j ; hba [ ctlr ] -> gendisk . nr_real = 0 ; for ( i = 0 ; i < NWD ; i ++ ) { drv = & ( hba [ ctlr ] -> drv [ i ] ) ; if ( ! ( drv -> nr_blocks ) ) continue ; hba [ ctlr ] -> hd [ i << NWD_SHIFT ] . nr_sects = hba [ ctlr ] -> sizes [ i << NWD_SHIFT ] = drv -> nr_blocks ; for ( j = 0 ; j < MAX_PART ; j ++ ) { hba [ ctlr ] -> blocksizes [ ( i << NWD_SHIFT ) + j ] = 1024 ; hba [ ctlr ] -> hardsizes [ ( i << NWD_SHIFT ) + j ] = drv -> block_size ; } hba [ ctlr ] -> gendisk . nr_real ++ ; } }
fills in the disk information.
fills in the disk information .
/* Loop through each real device */ /* for each partition */