kernels/linux-2.4.0/drivers/md/lvm.c
/*
 * create a /proc entry for a logical volume
 */
create a /proc entry for a logical volume
create a / proc entry for a logical volume
inline void lvm_do_create_proc_entry_of_lv ( vg_t *vg_ptr, lv_t *lv_ptr) {
	char *basename;
	if ( vg_ptr->lv_subdir_pde != NULL) {
		basename = strrchr(lv_ptr->lv_name, '/');
		if (basename == NULL) basename = lv_ptr->lv_name;
		else		      basename++;
		pde = create_proc_entry(basename, S_IFREG,
					vg_ptr->lv_subdir_pde);
		if ( pde != NULL) {
			pde->read_proc = lvm_proc_read_lv_info;
			pde->data = lv_ptr;
		}
	}
}
inline void lvm_do_create_proc_entry_of_lv ( vg_t * vg_ptr , lv_t * lv_ptr ) { char * basename ; if ( vg_ptr -> lv_subdir_pde != NULL ) { basename = strrchr ( lv_ptr -> lv_name , ' ' ) ; if ( basename == NULL ) basename = lv_ptr -> lv_name ; else basename ++ ; pde = create_proc_entry ( basename , S_IFREG , vg_ptr -> lv_subdir_pde ) ; if ( pde != NULL ) { pde -> read_proc = lvm_proc_read_lv_info ; pde -> data = lv_ptr ; } } }
create a /proc entry for a logical volume
create a / proc entry for a logical volume