Lines Matching refs:ctl_handle
169 static int snapshot_ctl(raid_obj_handle_t ctl_handle, uint8_t recursive,
175 static int print_ctl_table(raid_obj_handle_t ctl_handle);
176 static int print_array_table(raid_obj_handle_t ctl_handle,
178 static int print_disk_table(raid_obj_handle_t ctl_handle,
183 static int print_disk_attr(raid_obj_handle_t ctl_handle,
570 raid_obj_handle_t ctl_handle = INIT_HANDLE_VALUE; in do_create_cidl() local
595 ctl_handle = raidcfg_get_controller(ctl_tag); in do_create_cidl()
596 if (ctl_handle <= 0) { in do_create_cidl()
597 (void) fprintf(stderr, "%s\n", raidcfg_errstr(ctl_handle)); in do_create_cidl()
601 if ((ret = raidcfg_get_attr(ctl_handle, &ctl_attr)) < 0) { in do_create_cidl()
660 if ((ret = raidcfg_open_controller(ctl_handle, NULL)) < 0) { in do_create_cidl()
668 (void) raidcfg_close_controller(ctl_handle, NULL); in do_create_cidl()
679 (void) raidcfg_close_controller(ctl_handle, NULL); in do_create_cidl()
692 (void) raidcfg_close_controller(ctl_handle, NULL); in do_create_cidl()
700 (void) raidcfg_close_controller(ctl_handle, NULL); in do_create_cidl()
709 (void) print_array_table(ctl_handle, array_handle); in do_create_cidl()
712 (void) raidcfg_close_controller(ctl_handle, NULL); in do_create_cidl()
732 raid_obj_handle_t ctl_handle = INIT_HANDLE_VALUE; in do_create_ctd() local
804 ctl_handle = raidcfg_get_controller(ctl_tag); in do_create_ctd()
806 if (ctl_handle <= 0) { in do_create_ctd()
807 (void) fprintf(stderr, "%s\n", raidcfg_errstr(ctl_handle)); in do_create_ctd()
808 (void) raidcfg_close_controller(ctl_handle, NULL); in do_create_ctd()
814 if ((ret = raidcfg_get_attr(ctl_handle, &ctl_attr)) < 0) { in do_create_ctd()
816 (void) raidcfg_close_controller(ctl_handle, NULL); in do_create_ctd()
825 (void) raidcfg_close_controller(ctl_handle, NULL); in do_create_ctd()
838 (void) raidcfg_close_controller(ctl_handle, NULL); in do_create_ctd()
854 (void) raidcfg_close_controller(ctl_handle, NULL); in do_create_ctd()
862 (void) raidcfg_close_controller(ctl_handle, NULL); in do_create_ctd()
867 (void) raidcfg_close_controller(ctl_handle, NULL); in do_create_ctd()
887 raid_obj_handle_t ctl_handle = INIT_HANDLE_VALUE; in do_list() local
909 ctl_handle = in do_list()
911 if (ctl_handle <= 0) { in do_list()
913 raidcfg_errstr(ctl_handle)); in do_list()
919 raidcfg_open_controller(ctl_handle, in do_list()
930 print_ctl_table(ctl_handle); in do_list()
933 snapshot_ctl(ctl_handle, in do_list()
937 ctl_handle, NULL); in do_list()
945 ctl_handle = raidcfg_get_controller(ctl_tag); in do_list()
946 if (ctl_handle <= 0) { in do_list()
948 raidcfg_errstr(ctl_handle)); in do_list()
952 ret = raidcfg_open_controller(ctl_handle, NULL); in do_list()
959 array_handle = raidcfg_get_array(ctl_handle, in do_list()
965 ctl_handle, NULL); in do_list()
969 ret = print_array_table(ctl_handle, in do_list()
976 ctl_handle, NULL); in do_list()
988 ctl_handle = raidcfg_get_controller(ctl_tag); in do_list()
989 if (ctl_handle <= 0) { in do_list()
991 raidcfg_errstr(ctl_handle)); in do_list()
999 ret = raidcfg_open_controller(ctl_handle, NULL); in do_list()
1006 disk_handle = raidcfg_get_disk(ctl_handle, disk_tag); in do_list()
1010 (void) raidcfg_close_controller(ctl_handle, NULL); in do_list()
1015 ret = print_disk_table(ctl_handle, disk_handle); in do_list()
1020 (void) raidcfg_close_controller(ctl_handle, NULL); in do_list()
1036 raid_obj_handle_t ctl_handle; in do_delete() local
1049 ctl_handle = raidcfg_get_controller(ctl_tag); in do_delete()
1050 if (ctl_handle <= 0) { in do_delete()
1051 (void) fprintf(stderr, "%s\n", raidcfg_errstr(ctl_handle)); in do_delete()
1055 ret = raidcfg_open_controller(ctl_handle, NULL); in do_delete()
1061 array_handle = raidcfg_get_array(ctl_handle, array_tag.idl.target_id, in do_delete()
1065 (void) raidcfg_close_controller(ctl_handle, NULL); in do_delete()
1076 (void) raidcfg_close_controller(ctl_handle, NULL); in do_delete()
1084 (void) raidcfg_close_controller(ctl_handle, NULL); in do_delete()
1090 (void) raidcfg_close_controller(ctl_handle, NULL); in do_delete()
1106 raid_obj_handle_t ctl_handle = INIT_HANDLE_VALUE; in do_flash() local
1131 if ((ctl_handle = raidcfg_get_controller(ctl_tag)) < 0) { in do_flash()
1133 raidcfg_errstr(ctl_handle)); in do_flash()
1137 ret = raidcfg_open_controller(ctl_handle, NULL); in do_flash()
1146 if ((ret = raidcfg_update_fw(ctl_handle, filep, NULL)) < 0) { in do_flash()
1148 (void) raidcfg_close_controller(ctl_handle, NULL); in do_flash()
1155 (void) raidcfg_close_controller(ctl_handle, NULL); in do_flash()
1172 raid_obj_handle_t ctl_handle = INIT_HANDLE_VALUE; in do_set_hsp() local
1213 ctl_handle = raidcfg_get_controller(ctl_tag); in do_set_hsp()
1214 if (ctl_handle <= 0) { in do_set_hsp()
1216 raidcfg_errstr(ctl_handle)); in do_set_hsp()
1220 ret = raidcfg_open_controller(ctl_handle, NULL); in do_set_hsp()
1226 disk_handle = raidcfg_get_disk(ctl_handle, disk_tag); in do_set_hsp()
1230 (void) raidcfg_close_controller(ctl_handle, NULL); in do_set_hsp()
1242 ctl_handle = raidcfg_get_controller(ctl_tag); in do_set_hsp()
1243 if (ctl_handle <= 0) { in do_set_hsp()
1245 raidcfg_errstr(ctl_handle)); in do_set_hsp()
1249 ret = raidcfg_open_controller(ctl_handle, NULL); in do_set_hsp()
1256 if ((ret = raidcfg_get_attr(ctl_handle, &ctl_attr)) < 0) { in do_set_hsp()
1258 (void) raidcfg_close_controller(ctl_handle, NULL); in do_set_hsp()
1263 (void) raidcfg_close_controller(ctl_handle, NULL); in do_set_hsp()
1268 disk_handle = raidcfg_get_disk(ctl_handle, disk_tag); in do_set_hsp()
1272 (void) raidcfg_close_controller(ctl_handle, NULL); in do_set_hsp()
1277 array_handle = raidcfg_get_array(ctl_handle, in do_set_hsp()
1282 (void) raidcfg_close_controller(ctl_handle, NULL); in do_set_hsp()
1300 (void) raidcfg_close_controller(ctl_handle, NULL); in do_set_hsp()
1316 (void) raidcfg_close_controller(ctl_handle, NULL); in do_set_hsp()
1330 (void) raidcfg_close_controller(ctl_handle, NULL); in do_set_hsp()
1347 raid_obj_handle_t ctl_handle = INIT_HANDLE_VALUE; in do_set_array_attr() local
1389 ctl_handle = raidcfg_get_controller(ctl_tag); in do_set_array_attr()
1390 if (ctl_handle <= 0) { in do_set_array_attr()
1391 (void) fprintf(stderr, "%s\n", raidcfg_errstr(ctl_handle)); in do_set_array_attr()
1395 ret = raidcfg_open_controller(ctl_handle, NULL); in do_set_array_attr()
1401 array_handle = raidcfg_get_array(ctl_handle, array_tag.idl.target_id, in do_set_array_attr()
1416 (void) raidcfg_close_controller(ctl_handle, NULL); in do_set_array_attr()
1423 (void) raidcfg_close_controller(ctl_handle, NULL); in do_set_array_attr()
1429 (void) raidcfg_close_controller(ctl_handle, NULL); in do_set_array_attr()
1442 raid_obj_handle_t ctl_handle = INIT_HANDLE_VALUE; in snapshot_raidsystem() local
1445 ctl_handle = raidcfg_list_head(OBJ_SYSTEM, OBJ_TYPE_CONTROLLER); in snapshot_raidsystem()
1446 while (ctl_handle > 0) { in snapshot_raidsystem()
1447 ret = raidcfg_open_controller(ctl_handle, NULL); in snapshot_raidsystem()
1449 if (snapshot_ctl(ctl_handle, recursive, indent, in snapshot_raidsystem()
1451 (void) raidcfg_close_controller(ctl_handle, in snapshot_raidsystem()
1455 ctl_handle = raidcfg_list_next(ctl_handle); in snapshot_raidsystem()
1466 snapshot_ctl(raid_obj_handle_t ctl_handle, uint8_t recursive, uint8_t indent, in snapshot_ctl() argument
1476 if ((ret = raidcfg_get_attr(ctl_handle, &ctl_attr)) < 0) { in snapshot_ctl()
1494 array_handle = raidcfg_list_head(ctl_handle, OBJ_TYPE_ARRAY); in snapshot_ctl()
1504 disk_handle = raidcfg_list_head(ctl_handle, OBJ_TYPE_DISK); in snapshot_ctl()
1527 raid_obj_handle_t ctl_handle; in snapshot_array() local
1545 ctl_handle = raidcfg_get_container(array_handle); in snapshot_array()
1546 ret = raidcfg_get_attr(ctl_handle, &ctl_attr); in snapshot_array()
1731 raid_obj_handle_t ctl_handle = INIT_HANDLE_VALUE; in snapshot_disk() local
1741 ctl_handle = raidcfg_get_controller(ctl_tag); in snapshot_disk()
1742 ret = raidcfg_get_attr(ctl_handle, &ctl_attr); in snapshot_disk()
1804 print_ctl_table(raid_obj_handle_t ctl_handle) in print_ctl_table() argument
1810 if ((ret = raidcfg_get_attr(ctl_handle, &ctl_attr)) < 0) { in print_ctl_table()
1832 print_array_table(raid_obj_handle_t ctl_handle, raid_obj_handle_t array_handle) in print_array_table() argument
1850 if ((ret = raidcfg_get_attr(ctl_handle, &ctl_attr)) < 0) { in print_array_table()
1997 print_disk_table(raid_obj_handle_t ctl_handle, raid_obj_handle_t disk_handle) in print_disk_table() argument
2006 if ((ret = raidcfg_get_attr(ctl_handle, &ctl_attr)) < 0) { in print_disk_table()
2032 (void) print_disk_attr(ctl_handle, disk_handle, &disk_attr); in print_disk_table()
2241 print_disk_attr(raid_obj_handle_t ctl_handle, raid_obj_handle_t disk_handle, in print_disk_attr() argument
2291 if ((ret = raidcfg_get_attr(ctl_handle, &ctl_attr)) < 0) { in print_disk_attr()
2463 raid_obj_handle_t ctl_handle; in get_disk_handle_ctd() local
2482 ctl_handle = raidcfg_get_controller(*ctl_tagp); in get_disk_handle_ctd()
2483 if (ctl_handle <= 0) { in get_disk_handle_ctd()
2485 raidcfg_errstr(ctl_handle)); in get_disk_handle_ctd()
2488 ret = raidcfg_open_controller(ctl_handle, NULL); in get_disk_handle_ctd()
2497 raidcfg_get_disk(ctl_handle, disk_tag)) < 0) { in get_disk_handle_ctd()
2500 (void) raidcfg_close_controller(ctl_handle, NULL); in get_disk_handle_ctd()