kernels/linux-2.4.0/fs/partitions/check.c
/*
 * Add a partitions details to the devices partition description.
 */
Add a partitions details to the devices partition description.
Add a partitions details to the devices partition description .
void add_gd_partition(struct gendisk *hd, int minor, int start, int size)
{
#ifndef CONFIG_DEVFS_FS
	char buf[40];
#endif
	hd->part[minor].start_sect = start;
	hd->part[minor].nr_sects   = size;
#ifdef CONFIG_DEVFS_FS
	printk(" p%d", (minor & ((1 << hd->minor_shift) - 1)));
#else
	if ((hd->major >= COMPAQ_SMART2_MAJOR+0 && hd->major <= COMPAQ_SMART2_MAJOR+7) ||
	    (hd->major >= COMPAQ_CISS_MAJOR+0 && hd->major <= COMPAQ_CISS_MAJOR+7))
		printk(" p%d", (minor & ((1 << hd->minor_shift) - 1)));
	else
		printk(" %s", disk_name(hd, minor, buf));
#endif
}
void add_gd_partition ( struct gendisk * hd , int minor , int start , int size ) { #ifndef CONFIG_DEVFS_FS char buf [ 40 ] ; #endif hd -> part [ minor ] . start_sect = start ; hd -> part [ minor ] . nr_sects = size ; #ifdef CONFIG_DEVFS_FS printk ( " " , ( minor & ( ( 1 << hd -> minor_shift ) - 1 ) ) ) ; #else if ( ( hd -> major >= COMPAQ_SMART2_MAJOR + 0 && hd -> major <= COMPAQ_SMART2_MAJOR + 7 ) || ( hd -> major >= COMPAQ_CISS_MAJOR + 0 && hd -> major <= COMPAQ_CISS_MAJOR + 7 ) ) printk ( " " , ( minor & ( ( 1 << hd -> minor_shift ) - 1 ) ) ) ; else printk ( " " , disk_name ( hd , minor , buf ) ) ; #endif }
Add a partitions details to the devices partition description.
Add a partitions details to the devices partition description .