diff options
author | Christoph Hellwig <hch@lst.de> | 2015-10-03 09:32:55 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-10-14 01:17:49 -0400 |
commit | 2eafd72939fda6118e27d3ee859684987f43921b (patch) | |
tree | a00a1f5686ec852e04b52ea5fb1ce37c05564dc9 /Documentation/target/tcm_mod_builder.py | |
parent | 64c6be0e6df5b5804613863ca4fb05961948c999 (diff) |
target: use per-attribute show and store methods
This also allows to remove the target-specific old configfs macros, and
gets rid of the target_core_fabric_configfs.h header which only had one
function declaration left that could be moved to a better place.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org>
Acked-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'Documentation/target/tcm_mod_builder.py')
-rwxr-xr-x | Documentation/target/tcm_mod_builder.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py index cda56df9b8a7..7d370c9b1450 100755 --- a/Documentation/target/tcm_mod_builder.py +++ b/Documentation/target/tcm_mod_builder.py | |||
@@ -203,8 +203,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
203 | buf += "#include <scsi/scsi_proto.h>\n\n" | 203 | buf += "#include <scsi/scsi_proto.h>\n\n" |
204 | buf += "#include <target/target_core_base.h>\n" | 204 | buf += "#include <target/target_core_base.h>\n" |
205 | buf += "#include <target/target_core_fabric.h>\n" | 205 | buf += "#include <target/target_core_fabric.h>\n" |
206 | buf += "#include <target/target_core_fabric_configfs.h>\n" | ||
207 | buf += "#include <target/configfs_macros.h>\n\n" | ||
208 | buf += "#include \"" + fabric_mod_name + "_base.h\"\n" | 206 | buf += "#include \"" + fabric_mod_name + "_base.h\"\n" |
209 | buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" | 207 | buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" |
210 | 208 | ||
@@ -283,19 +281,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
283 | buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + ", " + fabric_mod_port + "_wwn);\n" | 281 | buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + ", " + fabric_mod_port + "_wwn);\n" |
284 | buf += " kfree(" + fabric_mod_port + ");\n" | 282 | buf += " kfree(" + fabric_mod_port + ");\n" |
285 | buf += "}\n\n" | 283 | buf += "}\n\n" |
286 | buf += "static ssize_t " + fabric_mod_name + "_wwn_show_attr_version(\n" | ||
287 | buf += " struct target_fabric_configfs *tf,\n" | ||
288 | buf += " char *page)\n" | ||
289 | buf += "{\n" | ||
290 | buf += " return sprintf(page, \"" + fabric_mod_name.upper() + " fabric module %s on %s/%s\"\n" | ||
291 | buf += " \"on \"UTS_RELEASE\"\\n\", " + fabric_mod_name.upper() + "_VERSION, utsname()->sysname,\n" | ||
292 | buf += " utsname()->machine);\n" | ||
293 | buf += "}\n\n" | ||
294 | buf += "TF_WWN_ATTR_RO(" + fabric_mod_name + ", version);\n\n" | ||
295 | buf += "static struct configfs_attribute *" + fabric_mod_name + "_wwn_attrs[] = {\n" | ||
296 | buf += " &" + fabric_mod_name + "_wwn_version.attr,\n" | ||
297 | buf += " NULL,\n" | ||
298 | buf += "};\n\n" | ||
299 | 284 | ||
300 | buf += "static const struct target_core_fabric_ops " + fabric_mod_name + "_ops = {\n" | 285 | buf += "static const struct target_core_fabric_ops " + fabric_mod_name + "_ops = {\n" |
301 | buf += " .module = THIS_MODULE,\n" | 286 | buf += " .module = THIS_MODULE,\n" |
@@ -328,8 +313,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name): | |||
328 | buf += " .fabric_drop_wwn = " + fabric_mod_name + "_drop_" + fabric_mod_port + ",\n" | 313 | buf += " .fabric_drop_wwn = " + fabric_mod_name + "_drop_" + fabric_mod_port + ",\n" |
329 | buf += " .fabric_make_tpg = " + fabric_mod_name + "_make_tpg,\n" | 314 | buf += " .fabric_make_tpg = " + fabric_mod_name + "_make_tpg,\n" |
330 | buf += " .fabric_drop_tpg = " + fabric_mod_name + "_drop_tpg,\n" | 315 | buf += " .fabric_drop_tpg = " + fabric_mod_name + "_drop_tpg,\n" |
331 | buf += "\n" | ||
332 | buf += " .tfc_wwn_attrs = " + fabric_mod_name + "_wwn_attrs,\n" | ||
333 | buf += "};\n\n" | 316 | buf += "};\n\n" |
334 | 317 | ||
335 | buf += "static int __init " + fabric_mod_name + "_init(void)\n" | 318 | buf += "static int __init " + fabric_mod_name + "_init(void)\n" |