diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-09-07 16:15:39 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-09-07 16:15:39 +0000 |
commit | 9848c1fa4ee7b49d425cb790fe9ab5edff8761dd (patch) | |
tree | 6369e307b10bb2ea5f5270fa81358bf26045dc41 /tools/hcitool.c | |
parent | 97dc071487f722e3ec91534e79313a843b85fb3e (diff) |
Show supported commands also in clear text
Diffstat (limited to 'tools/hcitool.c')
-rw-r--r-- | tools/hcitool.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/hcitool.c b/tools/hcitool.c index bc09ea07..2865ec42 100644 --- a/tools/hcitool.c +++ b/tools/hcitool.c @@ -595,12 +595,15 @@ static void cmd_scan(int dev_id, int argc, char **argv) if (extinf && handle > 0) { if (hci_read_remote_version(dd, handle, &version, 20000) == 0) { + char *ver = lmp_vertostr(version.lmp_ver); printf("Manufacturer:\t%s (%d)\n", bt_compidtostr(version.manufacturer), version.manufacturer); printf("LMP version:\t%s (0x%x) [subver 0x%x]\n", - lmp_vertostr(version.lmp_ver), + ver ? ver : "n/a", version.lmp_ver, version.lmp_subver); + if (ver) + bt_free(ver); } if (hci_read_remote_features(dd, handle, features, 20000) == 0) { @@ -779,13 +782,16 @@ static void cmd_info(int dev_id, int argc, char **argv) printf("\tDevice Name: %s\n", name); if (hci_read_remote_version(dd, handle, &version, 20000) == 0) { + char *ver = lmp_vertostr(version.lmp_ver); printf("\tLMP Version: %s (0x%x) LMP Subversion: 0x%x\n" "\tManufacturer: %s (%d)\n", - lmp_vertostr(version.lmp_ver), + ver ? ver : "n/a", version.lmp_ver, version.lmp_subver, bt_compidtostr(version.manufacturer), version.manufacturer); + if (ver) + bt_free(ver); } if (hci_read_remote_features(dd, handle, features, 20000) == 0) { |