mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-04-28 22:53:37 +02:00
make it possible to provide keyring id in hexadecimal format
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
This commit is contained in:
parent
24c9e6adc7
commit
dddef9172e
@ -963,7 +963,10 @@ static int cmd_import(struct command *cmd)
|
|||||||
|
|
||||||
if (ring) {
|
if (ring) {
|
||||||
if (ring[0] != '@') {
|
if (ring[0] != '@') {
|
||||||
id = atoi(ring);
|
int base = 10;
|
||||||
|
if (ring[0] == '0' && ring[1] == 'x')
|
||||||
|
base = 16;
|
||||||
|
id = strtoul(ring, NULL, base);
|
||||||
} else {
|
} else {
|
||||||
if (strcmp(ring, "@t") == 0)
|
if (strcmp(ring, "@t") == 0)
|
||||||
id = -1;
|
id = -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user