FreeBSD/usr.sbin/mlxcontrol/config.c
/********************************************************************************
 * Get the configuration from the selected controller.
 *
 * config <controller>
 *		Print the configuration for <controller>
 *
 * XXX update to support adding/deleting drives.
 */
Get the configuration from the selected controller.
config 
Print the configuration for 

XXX update to support adding/deleting drives.
Get the configuration from the selected controller . config Print the configuration for XXX update to support adding / deleting drives .
int
cmd_config(int argc, char *argv[]) 
{
    struct conf_config	conf;
    int			unit = 0;	
    int			i, j;
    bzero(&conf.cc_cfg, sizeof(conf.cc_cfg));
    if (mlx_read_configuration(unit, &conf.cc_cfg)) {
	printf("mlx%d: error submitting READ CONFIGURATION\n", unit);
    } else {
	printf("# Controller <INSERT DETAILS HERE>\n");
	printf("#\n# Physical devices connected:\n");
	for (i = 0; i < 5; i++)
	    for (j = 0; j < 16; j++)
	    print_phys_drive(&conf, i, j);
	printf("#\n# System Drives defined:\n");
	for (i = 0; i < conf.cc_cfg.cc_num_sys_drives; i++)
	    print_sys_drive(&conf, i);
    }
    return(0);
}
int cmd_config ( int argc , char * argv [ ] ) { struct conf_config conf ; int unit = 0 ; int i , j ; bzero ( & conf . cc_cfg , sizeof ( conf . cc_cfg ) ) ; if ( mlx_read_configuration ( unit , & conf . cc_cfg ) ) { printf ( " \n " , unit ) ; } else { printf ( " \n " ) ; printf ( " \n \n " ) ; for ( i = 0 ; i < 5 ; i ++ ) for ( j = 0 ; j < 16 ; j ++ ) print_phys_drive ( & conf , i , j ) ; printf ( " \n \n " ) ; for ( i = 0 ; i < conf . cc_cfg . cc_num_sys_drives ; i ++ ) print_sys_drive ( & conf , i ) ; } return ( 0 ) ; }
Get the configuration from the selected controller.
Get the configuration from the selected controller .
/* XXX */