aboutsummaryrefslogtreecommitdiff
path: root/projects/hsm/mgmt-firmware.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2016-07-21 16:32:43 -0400
committerPaul Selkirk <paul@psgd.org>2016-07-21 16:32:43 -0400
commite3fe7d89b6094bfef42f42329e15631f684f0748 (patch)
treedbaca9b4ce50dca6950a658cef99d20d5d7922ae /projects/hsm/mgmt-firmware.c
parent91cc61352451093e26605f4a9bbe83798da02fd0 (diff)
Use a fresh port of libcli, which retains more of the original API.
Diffstat (limited to 'projects/hsm/mgmt-firmware.c')
-rw-r--r--projects/hsm/mgmt-firmware.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/projects/hsm/mgmt-firmware.c b/projects/hsm/mgmt-firmware.c
index 1a0e184..ec8a69d 100644
--- a/projects/hsm/mgmt-firmware.c
+++ b/projects/hsm/mgmt-firmware.c
@@ -35,10 +35,11 @@
/* Rename both CMSIS HAL_OK and libhal HAL_OK to disambiguate */
#define HAL_OK CMSIS_HAL_OK
#include "stm-init.h"
-#include "mgmt-cli.h"
#include "stm-uart.h"
#include "stm-flash.h"
+#include "mgmt-cli.h"
+
#undef HAL_OK
#define HAL_OK LIBHAL_OK
#include "hal.h"
@@ -63,7 +64,9 @@ static int cmd_firmware_upload(struct cli_def *cli, const char *command, char *a
void configure_cli_firmware(struct cli_def *cli)
{
- cli_command_root(firmware);
+ struct cli_command *c;
+
+ c = cli_register_command(cli, NULL, "firmware", NULL, 0, 0, NULL);
- cli_command_node(firmware, upload, "Upload new firmware image");
+ cli_register_command(cli, c, "upload", cmd_firmware_upload, 0, 0, "Upload new firmware image");
}