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/pld/pld.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/pld/pld.c')
-rw-r--r-- | src/pld/pld.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pld/pld.c b/src/pld/pld.c index d021f7bf..021a8e6f 100644 --- a/src/pld/pld.c +++ b/src/pld/pld.c @@ -189,10 +189,10 @@ int pld_init(struct command_context *cmd_ctx) if (!pld_devices) return ERROR_OK; - register_command(cmd_ctx, pld_cmd, "devices", + COMMAND_REGISTER(cmd_ctx, pld_cmd, "devices", handle_pld_devices_command, COMMAND_EXEC, "list configured pld devices"); - register_command(cmd_ctx, pld_cmd, "load", + COMMAND_REGISTER(cmd_ctx, pld_cmd, "load", handle_pld_load_command, COMMAND_EXEC, "load configuration <file> into programmable logic device"); @@ -201,9 +201,9 @@ int pld_init(struct command_context *cmd_ctx) int pld_register_commands(struct command_context *cmd_ctx) { - pld_cmd = register_command(cmd_ctx, NULL, "pld", NULL, COMMAND_ANY, "programmable logic device commands"); + pld_cmd = COMMAND_REGISTER(cmd_ctx, NULL, "pld", NULL, COMMAND_ANY, "programmable logic device commands"); - register_command(cmd_ctx, pld_cmd, "device", handle_pld_device_command, COMMAND_CONFIG, NULL); + COMMAND_REGISTER(cmd_ctx, pld_cmd, "device", handle_pld_device_command, COMMAND_CONFIG, NULL); return ERROR_OK; } |