kernels/linux-2.4.0/drivers/md/lvm.c
/*
 * provide VG info for proc filesystem use (global)
 */
provide VG info for proc filesystem use (global)
provide VG info for proc filesystem use ( global )
int lvm_vg_info(vg_t *vg_ptr, char *buf) {
	int sz = 0;
	char inactive_flag = ' ';
	if (!(vg_ptr->vg_status & VG_ACTIVE)) inactive_flag = 'I';
	sz = sprintf(buf,
		     "\nVG: %c%s  [%d PV, %d LV/%d open] "
		     " PE Size: %d KB\n"
		     "  Usage [KB/PE]: %d /%d total  "
		     "%d /%d used  %d /%d free",
		     inactive_flag,
		     vg_ptr->vg_name,
		     vg_ptr->pv_cur,
		     vg_ptr->lv_cur,
		     vg_ptr->lv_open,
	     	     vg_ptr->pe_size >> 1,
		     vg_ptr->pe_size * vg_ptr->pe_total >> 1,
		     vg_ptr->pe_total,
		     vg_ptr->pe_allocated * vg_ptr->pe_size >> 1,
	     	     vg_ptr->pe_allocated,
		     (vg_ptr->pe_total - vg_ptr->pe_allocated) *	
	     	     vg_ptr->pe_size >> 1,
		     vg_ptr->pe_total - vg_ptr->pe_allocated);
	return sz;
}
int lvm_vg_info ( vg_t * vg_ptr , char * buf ) { int sz = 0 ; char inactive_flag = ' ' ; if ( ! ( vg_ptr -> vg_status & VG_ACTIVE ) ) inactive_flag = ' ' ; sz = sprintf ( buf , " \n " " \n " " " " " , inactive_flag , vg_ptr -> vg_name , vg_ptr -> pv_cur , vg_ptr -> lv_cur , vg_ptr -> lv_open , vg_ptr -> pe_size >> 1 , vg_ptr -> pe_size * vg_ptr -> pe_total >> 1 , vg_ptr -> pe_total , vg_ptr -> pe_allocated * vg_ptr -> pe_size >> 1 , vg_ptr -> pe_allocated , ( vg_ptr -> pe_total - vg_ptr -> pe_allocated ) * vg_ptr -> pe_size >> 1 , vg_ptr -> pe_total - vg_ptr -> pe_allocated ) ; return sz ; }
provide VG info for proc filesystem use (global)
provide VG info for proc filesystem use ( global )