[02/10] cmd: avb read_rb: print rb_idx in hexadecimal

Message ID 20180813155347.13844-3-jens.wiklander@linaro.org
State Superseded
Headers show
Series
  • AVB using OP-TEE
Related show

Commit Message

Jens Wiklander Aug. 13, 2018, 3:53 p.m.
Prior to this patch was do_avb_write_rb() reading supplied rb_idx as a
hexadecimal number while do_avb_read_rb() printed the read out rb_idx as
decimal number. For consistency change do_avb_read_rb() to print rb_idx
as a hexadeciaml number too.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

---
 cmd/avb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Igor Opaniuk Aug. 14, 2018, 11:34 a.m. | #1
Typo in the commit message "hexadeciaml number", otherwise:

Reviewed-by: Igor Opaniuk <igor.opaniuk@linaro.org>

On 13 August 2018 at 18:53, Jens Wiklander <jens.wiklander@linaro.org> wrote:
> Prior to this patch was do_avb_write_rb() reading supplied rb_idx as a
> hexadecimal number while do_avb_read_rb() printed the read out rb_idx as
> decimal number. For consistency change do_avb_read_rb() to print rb_idx
> as a hexadeciaml number too.
>
> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> ---
>  cmd/avb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cmd/avb.c b/cmd/avb.c
> index f045a0c64c4a..ca4b26d5d7b3 100644
> --- a/cmd/avb.c
> +++ b/cmd/avb.c
> @@ -158,7 +158,7 @@ int do_avb_read_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>
>         if (avb_ops->read_rollback_index(avb_ops, index, &rb_idx) ==
>             AVB_IO_RESULT_OK) {
> -               printf("Rollback index: %llu\n", rb_idx);
> +               printf("Rollback index: %llx\n", rb_idx);
>                 return CMD_RET_SUCCESS;
>         }
>         return CMD_RET_FAILURE;
> --
> 2.17.1
>

Patch

diff --git a/cmd/avb.c b/cmd/avb.c
index f045a0c64c4a..ca4b26d5d7b3 100644
--- a/cmd/avb.c
+++ b/cmd/avb.c
@@ -158,7 +158,7 @@  int do_avb_read_rb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 	if (avb_ops->read_rollback_index(avb_ops, index, &rb_idx) ==
 	    AVB_IO_RESULT_OK) {
-		printf("Rollback index: %llu\n", rb_idx);
+		printf("Rollback index: %llx\n", rb_idx);
 		return CMD_RET_SUCCESS;
 	}
 	return CMD_RET_FAILURE;