diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-24 07:57:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-24 07:57:49 +0000 |
commit | fc67d3ad9a2903cc33e5cdaedaad51dd86a42236 (patch) | |
tree | 4ef72536a965fe220e71aea78b76b6bbbac2ed59 /nvme-rpmb.c | |
parent | Adding upstream version 2.5. (diff) | |
download | nvme-cli-fc67d3ad9a2903cc33e5cdaedaad51dd86a42236.tar.xz nvme-cli-fc67d3ad9a2903cc33e5cdaedaad51dd86a42236.zip |
Adding upstream version 2.7.1.upstream/2.7.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'nvme-rpmb.c')
-rw-r--r-- | nvme-rpmb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nvme-rpmb.c b/nvme-rpmb.c index 40ddb5b..345e6ea 100644 --- a/nvme-rpmb.c +++ b/nvme-rpmb.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* - * Copyright (C) 2020 Micron Techology Inc. All rights reserved. + * Copyright (C) 2020 Micron Technology Inc. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -32,6 +32,7 @@ #include "common.h" #include "nvme.h" #include "libnvme.h" +#include "nvme-print.h" #define CREATE_CMD @@ -48,7 +49,6 @@ #define HMAC_SHA256_HASH_SIZE 32 #define MD5_HASH_HASH_SIZE 16 -extern int nvme_show_id_ctrl_rpmbs(unsigned int); /* * Utility function to create hash value of given data (with given key) using * given hash algorithm; this function uses kernel crypto services @@ -68,7 +68,7 @@ unsigned char *create_hash(const char *algo, .salg_name = { 0 } }; - /* copy algorith name */ + /* copy algorithm name */ if (strlen(algo) > sizeof(provider_sa.salg_name)) { fprintf(stderr, "%s: algorithm name overflow", __func__); return hash; @@ -608,7 +608,7 @@ static int rpmb_program_auth_key(int fd, unsigned char target, goto out; } - /* re-use response buffer */ + /* reuse response buffer */ memset(rsp, 0, rsp_size); err = recv_rpmb_rsp(fd, req->target, rsp_size, rsp); if (err != 0) { @@ -903,7 +903,7 @@ int rpmb_cmd_option(int argc, char **argv, struct command *cmd, struct plugin *p /* parse and validate options; default print rpmb support info */ if (cfg.cmd == 0 || strcmp(cfg.cmd, "info") == 0) { - nvme_show_id_ctrl_rpmbs(regs.rpmbs); + nvme_show_id_ctrl_rpmbs(regs.rpmbs, 0); goto out; } @@ -1005,7 +1005,7 @@ int rpmb_cmd_option(int argc, char **argv, struct command *cmd, struct plugin *p cfg.blocks, (regs.access_size + 1)); if (err > 0 && msg_buf != NULL) { - printf("Writting %d bytes to file %s\n", + printf("Writing %d bytes to file %s\n", err * 512, cfg.msgfile); write_file(msg_buf, err * 512, NULL, cfg.msgfile, NULL); |