diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-20 11:26:35 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-24 21:37:29 -0800 |
commit | 833e7f5248778bcb31b4db1a1b91160995415203 (patch) | |
tree | 7d5d5fa143b74f4989cc3226a0958e983cb1d2b5 /src/helper/ioutil.c | |
parent | f7e1f2df74b599903a6fb2d2ace94c3f1ef06097 (diff) |
use COMMAND_REGISTER macro
Replaces direct calls to register_command() with a macro, to allow
its parameters to be changed and callers updated in phases.
Diffstat (limited to 'src/helper/ioutil.c')
-rw-r--r-- | src/helper/ioutil.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/helper/ioutil.c b/src/helper/ioutil.c index 3fb3014a..52ecb9f2 100644 --- a/src/helper/ioutil.c +++ b/src/helper/ioutil.c @@ -647,22 +647,22 @@ static int zylinjtag_Jim_Command_mac(Jim_Interp *interp, int argc, int ioutil_init(struct command_context *cmd_ctx) { - register_command(cmd_ctx, NULL, "rm", handle_rm_command, COMMAND_ANY, + COMMAND_REGISTER(cmd_ctx, NULL, "rm", handle_rm_command, COMMAND_ANY, "remove file"); - register_command(cmd_ctx, NULL, "cat", handle_cat_command, COMMAND_ANY, + COMMAND_REGISTER(cmd_ctx, NULL, "cat", handle_cat_command, COMMAND_ANY, "display file content"); - register_command(cmd_ctx, NULL, "trunc", handle_trunc_command, COMMAND_ANY, + COMMAND_REGISTER(cmd_ctx, NULL, "trunc", handle_trunc_command, COMMAND_ANY, "truncate a file to 0 size"); - register_command(cmd_ctx, NULL, "cp", handle_cp_command, + COMMAND_REGISTER(cmd_ctx, NULL, "cp", handle_cp_command, COMMAND_ANY, "copy a file <from> <to>"); - register_command(cmd_ctx, NULL, "append_file", handle_append_command, + COMMAND_REGISTER(cmd_ctx, NULL, "append_file", handle_append_command, COMMAND_ANY, "append a variable number of strings to a file"); - register_command(cmd_ctx, NULL, "meminfo", handle_meminfo_command, + COMMAND_REGISTER(cmd_ctx, NULL, "meminfo", handle_meminfo_command, COMMAND_ANY, "display available ram memory"); Jim_CreateCommand(interp, "rm", zylinjtag_Jim_Command_rm, NULL, NULL); |