diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index 15305cf..e9a8495 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
fprintf(stderr, fmt "\n", ## arg); \
} while (0)
-static size_t convert_hexstr(const char *hexstr, uint8_t *buf, size_t buflen)
+static size_t hex2bin(const char *hexstr, uint8_t *buf, size_t buflen)
{
size_t i, len;
return false;
str2ba(addr, &irk->addr.bdaddr);
- convert_hexstr(key, irk->val, sizeof(irk->val));
+ hex2bin(key, irk->val, sizeof(irk->val));
free(addr);
free(key);
index = 0;
if (argc > 2) {
- if (convert_hexstr(argv[2], cp.irk,
+ if (hex2bin(argv[2], cp.irk,
sizeof(cp.irk)) != sizeof(cp.irk)) {
error("Invalid key format");
return noninteractive_quit(EXIT_FAILURE);
cp.addr.type = strtol(optarg, NULL, 0);
break;
case 'r':
- convert_hexstr(optarg, cp.rand192, 16);
+ hex2bin(optarg, cp.rand192, 16);
break;
case 'h':
- convert_hexstr(optarg, cp.hash192, 16);
+ hex2bin(optarg, cp.hash192, 16);
break;
case 'R':
- convert_hexstr(optarg, cp.rand256, 16);
+ hex2bin(optarg, cp.rand256, 16);
break;
case 'H':
- convert_hexstr(optarg, cp.hash256, 16);
+ hex2bin(optarg, cp.hash256, 16);
break;
default:
remote_oob_usage();