@@ -389,9 +389,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
389389 buf += " .release_cmd = " + fabric_mod_name + "_release_cmd,\n "
390390 buf += " .shutdown_session = " + fabric_mod_name + "_shutdown_session,\n "
391391 buf += " .close_session = " + fabric_mod_name + "_close_session,\n "
392- buf += " .stop_session = " + fabric_mod_name + "_stop_session,\n "
393- buf += " .fall_back_to_erl0 = " + fabric_mod_name + "_reset_nexus,\n "
394- buf += " .sess_logged_in = " + fabric_mod_name + "_sess_logged_in,\n "
395392 buf += " .sess_get_index = " + fabric_mod_name + "_sess_get_index,\n "
396393 buf += " .sess_get_initiator_sid = NULL,\n "
397394 buf += " .write_pending = " + fabric_mod_name + "_write_pending,\n "
@@ -402,7 +399,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
402399 buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n "
403400 buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n "
404401 buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n "
405- buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove ,\n "
402+ buf += " .aborted_task = " + fabric_mod_name + "_aborted_task ,\n "
406403 buf += " /*\n "
407404 buf += " * Setup function pointers for generic logic in target_core_fabric_configfs.c\n "
408405 buf += " */\n "
@@ -428,7 +425,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
428425 buf += " /*\n "
429426 buf += " * Register the top level struct config_item_type with TCM core\n "
430427 buf += " */\n "
431- buf += " fabric = target_fabric_configfs_init(THIS_MODULE, \" " + fabric_mod_name [ 4 :] + "\" );\n "
428+ buf += " fabric = target_fabric_configfs_init(THIS_MODULE, \" " + fabric_mod_name + "\" );\n "
432429 buf += " if (IS_ERR(fabric)) {\n "
433430 buf += " printk(KERN_ERR \" target_fabric_configfs_init() failed\\ n\" );\n "
434431 buf += " return PTR_ERR(fabric);\n "
@@ -595,7 +592,7 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
595592 if re .search ('get_fabric_name' , fo ):
596593 buf += "char *" + fabric_mod_name + "_get_fabric_name(void)\n "
597594 buf += "{\n "
598- buf += " return \" " + fabric_mod_name [ 4 :] + "\" ;\n "
595+ buf += " return \" " + fabric_mod_name + "\" ;\n "
599596 buf += "}\n \n "
600597 bufi += "char *" + fabric_mod_name + "_get_fabric_name(void);\n "
601598 continue
@@ -820,27 +817,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
820817 buf += "}\n \n "
821818 bufi += "void " + fabric_mod_name + "_close_session(struct se_session *);\n "
822819
823- if re .search ('stop_session\)\(' , fo ):
824- buf += "void " + fabric_mod_name + "_stop_session(struct se_session *se_sess, int sess_sleep , int conn_sleep)\n "
825- buf += "{\n "
826- buf += " return;\n "
827- buf += "}\n \n "
828- bufi += "void " + fabric_mod_name + "_stop_session(struct se_session *, int, int);\n "
829-
830- if re .search ('fall_back_to_erl0\)\(' , fo ):
831- buf += "void " + fabric_mod_name + "_reset_nexus(struct se_session *se_sess)\n "
832- buf += "{\n "
833- buf += " return;\n "
834- buf += "}\n \n "
835- bufi += "void " + fabric_mod_name + "_reset_nexus(struct se_session *);\n "
836-
837- if re .search ('sess_logged_in\)\(' , fo ):
838- buf += "int " + fabric_mod_name + "_sess_logged_in(struct se_session *se_sess)\n "
839- buf += "{\n "
840- buf += " return 0;\n "
841- buf += "}\n \n "
842- bufi += "int " + fabric_mod_name + "_sess_logged_in(struct se_session *);\n "
843-
844820 if re .search ('sess_get_index\)\(' , fo ):
845821 buf += "u32 " + fabric_mod_name + "_sess_get_index(struct se_session *se_sess)\n "
846822 buf += "{\n "
@@ -898,19 +874,18 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
898874 bufi += "int " + fabric_mod_name + "_queue_status(struct se_cmd *);\n "
899875
900876 if re .search ('queue_tm_rsp\)\(' , fo ):
901- buf += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *se_cmd)\n "
877+ buf += "void " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *se_cmd)\n "
902878 buf += "{\n "
903- buf += " return 0 ;\n "
879+ buf += " return;\n "
904880 buf += "}\n \n "
905- bufi += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n "
881+ bufi += "void " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n "
906882
907- if re .search ('is_state_remove \)\(' , fo ):
908- buf += "int " + fabric_mod_name + "_is_state_remove (struct se_cmd *se_cmd)\n "
883+ if re .search ('aborted_task \)\(' , fo ):
884+ buf += "void " + fabric_mod_name + "_aborted_task (struct se_cmd *se_cmd)\n "
909885 buf += "{\n "
910- buf += " return 0 ;\n "
886+ buf += " return;\n "
911887 buf += "}\n \n "
912- bufi += "int " + fabric_mod_name + "_is_state_remove(struct se_cmd *);\n "
913-
888+ bufi += "void " + fabric_mod_name + "_aborted_task(struct se_cmd *);\n "
914889
915890 ret = p .write (buf )
916891 if ret :
@@ -1018,11 +993,11 @@ def main(modname, proto_ident):
1018993 tcm_mod_build_kbuild (fabric_mod_dir , fabric_mod_name )
1019994 tcm_mod_build_kconfig (fabric_mod_dir , fabric_mod_name )
1020995
1021- input = raw_input ("Would you like to add " + fabric_mod_name + "to drivers/target/Makefile..? [yes,no]: " )
996+ input = raw_input ("Would you like to add " + fabric_mod_name + " to drivers/target/Makefile..? [yes,no]: " )
1022997 if input == "yes" or input == "y" :
1023998 tcm_mod_add_kbuild (tcm_dir , fabric_mod_name )
1024999
1025- input = raw_input ("Would you like to add " + fabric_mod_name + "to drivers/target/Kconfig..? [yes,no]: " )
1000+ input = raw_input ("Would you like to add " + fabric_mod_name + " to drivers/target/Kconfig..? [yes,no]: " )
10261001 if input == "yes" or input == "y" :
10271002 tcm_mod_add_kconfig (tcm_dir , fabric_mod_name )
10281003
0 commit comments