kernels/linux-2.4.0/drivers/md/lvm.c
/*
 * generate "hard disk" name
 */
generate "hard disk" name
generate " hard disk " name
void lvm_hd_name(char *buf, int minor)
{
	int len = 0;
	lv_t *lv_ptr;
	if (vg[VG_BLK(minor)] == NULL ||
	    (lv_ptr = vg[VG_BLK(minor)]->lv[LV_BLK(minor)]) == NULL)
		return;
	len = strlen(lv_ptr->lv_name) - 5;
	memcpy(buf, &lv_ptr->lv_name[5], len);
	buf[len] = 0;
	return;
}
void lvm_hd_name ( char * buf , int minor ) { int len = 0 ; lv_t * lv_ptr ; if ( vg [ VG_BLK ( minor ) ] == NULL || ( lv_ptr = vg [ VG_BLK ( minor ) ] -> lv [ LV_BLK ( minor ) ] ) == NULL ) return ; len = strlen ( lv_ptr -> lv_name ) - 5 ; memcpy ( buf , & lv_ptr -> lv_name [ 5 ] , len ) ; buf [ len ] = 0 ; return ; }
generate "hard disk" name
generate " hard disk " name