From dddef9172e6d9fc69fa4394c74ec374952e39bd5 Mon Sep 17 00:00:00 2001 From: Dmitry Kasatkin Date: Fri, 13 Jun 2014 12:59:14 +0300 Subject: [PATCH] make it possible to provide keyring id in hexadecimal format Signed-off-by: Dmitry Kasatkin --- src/evmctl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/evmctl.c b/src/evmctl.c index c5529f8..0d7c286 100644 --- a/src/evmctl.c +++ b/src/evmctl.c @@ -963,7 +963,10 @@ static int cmd_import(struct command *cmd) if (ring) { if (ring[0] != '@') { - id = atoi(ring); + int base = 10; + if (ring[0] == '0' && ring[1] == 'x') + base = 16; + id = strtoul(ring, NULL, base); } else { if (strcmp(ring, "@t") == 0) id = -1;