kernels/linux-2.4.0/drivers/md/lvm.c
/*
 * remove a /proc entry for a volume group
 */
remove a /proc entry for a volume group
remove a / proc entry for a volume group
void lvm_do_remove_proc_entry_of_vg ( vg_t *vg_ptr) {
	int l, p;
	lv_t *lv_ptr;
	pv_t *pv_ptr;
	for ( l = 0; l < vg_ptr->lv_max; l++) {
		if ( ( lv_ptr = vg_ptr->lv[l]) == NULL) continue;
		lvm_do_remove_proc_entry_of_lv ( vg_ptr, vg_ptr->lv[l]);
	}
	for ( p = 0; p < vg_ptr->pv_max; p++) {
		if ( ( pv_ptr = vg_ptr->pv[p]) == NULL) continue;
		lvm_do_remove_proc_entry_of_pv ( vg_ptr, vg_ptr->pv[p]);
	}
	if ( vg_ptr->vg_dir_pde != NULL) {
		remove_proc_entry(LVM_LV_SUBDIR, vg_ptr->vg_dir_pde);
		remove_proc_entry(LVM_PV_SUBDIR, vg_ptr->vg_dir_pde);
		remove_proc_entry("group", vg_ptr->vg_dir_pde);
		remove_proc_entry(vg_ptr->vg_name, lvm_proc_vg_subdir);
	}
}
void lvm_do_remove_proc_entry_of_vg ( vg_t * vg_ptr ) { int l , p ; lv_t * lv_ptr ; pv_t * pv_ptr ; for ( l = 0 ; l < vg_ptr -> lv_max ; l ++ ) { if ( ( lv_ptr = vg_ptr -> lv [ l ] ) == NULL ) continue ; lvm_do_remove_proc_entry_of_lv ( vg_ptr , vg_ptr -> lv [ l ] ) ; } for ( p = 0 ; p < vg_ptr -> pv_max ; p ++ ) { if ( ( pv_ptr = vg_ptr -> pv [ p ] ) == NULL ) continue ; lvm_do_remove_proc_entry_of_pv ( vg_ptr , vg_ptr -> pv [ p ] ) ; } if ( vg_ptr -> vg_dir_pde != NULL ) { remove_proc_entry ( LVM_LV_SUBDIR , vg_ptr -> vg_dir_pde ) ; remove_proc_entry ( LVM_PV_SUBDIR , vg_ptr -> vg_dir_pde ) ; remove_proc_entry ( " " , vg_ptr -> vg_dir_pde ) ; remove_proc_entry ( vg_ptr -> vg_name , lvm_proc_vg_subdir ) ; } }
remove a /proc entry for a volume group
remove a / proc entry for a volume group