aboutsummaryrefslogtreecommitdiff
path: root/projects/cli-test/mgmt-keystore.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-10-15 21:34:00 -0400
committerPaul Selkirk <paul@psgd.org>2017-10-15 21:34:00 -0400
commit5af4a915edf3e77705fa2625081200b61f8dda26 (patch)
tree46d8e3cc6e27627e9f3e78c5a0b4a3573d1b1de3 /projects/cli-test/mgmt-keystore.c
parentb159bf0bb24a99c7d3ff1b3855f840add63198e5 (diff)
Cleanup: All drivers return HAL_StatusTypeDef rather than magic values.
Note: This affects libhal/ks_token.c, which uses the keystore driver directly.
Diffstat (limited to 'projects/cli-test/mgmt-keystore.c')
-rw-r--r--projects/cli-test/mgmt-keystore.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/projects/cli-test/mgmt-keystore.c b/projects/cli-test/mgmt-keystore.c
index ea1f263..8c16f35 100644
--- a/projects/cli-test/mgmt-keystore.c
+++ b/projects/cli-test/mgmt-keystore.c
@@ -228,12 +228,12 @@ static int cmd_keystore_show_data(struct cli_def *cli, const char *command, char
argv = argv;
argc = argc;
- if (keystore_check_id() != 1) {
+ if (keystore_check_id() != CMSIS_HAL_OK) {
cli_print(cli, "ERROR: The keystore memory is not accessible.");
}
memset(buf, 0, sizeof(buf));
- if ((i = keystore_read_data(0, buf, sizeof(buf))) != 1) {
+ if ((i = keystore_read_data(0, buf, sizeof(buf))) != CMSIS_HAL_OK) {
cli_print(cli, "Failed reading first page from keystore memory: %li", i);
return CLI_ERROR;
}
@@ -355,7 +355,7 @@ static int cmd_keystore_erase(struct cli_def *cli, const char *command, char *ar
}
cli_print(cli, "OK, erasing keystore, this might take a while...");
- if ((status = keystore_erase_bulk()) != 1) {
+ if ((status = keystore_erase_bulk()) != CMSIS_HAL_OK) {
cli_print(cli, "Failed erasing token keystore: %i", status);
return CLI_ERROR;
}