summaryrefslogtreecommitdiff
path: root/tools/hwdb.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-12-28 01:26:49 -0800
committerMarcel Holtmann <marcel@holtmann.org>2012-12-28 01:26:49 -0800
commit9c5e0d4ea662604c8f74c8ea43dc74326bec8eff (patch)
tree14e2fcbabaa67c9d61dfde434f0066ff6e8c7f90 /tools/hwdb.c
parent0bca38fad052971b36eb03634dee158b5911cb51 (diff)
downloadbluez-9c5e0d4ea662604c8f74c8ea43dc74326bec8eff.tar.gz
tools: Add Nike+ FuelBand product to hwdb utility
Diffstat (limited to 'tools/hwdb.c')
-rw-r--r--tools/hwdb.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/hwdb.c b/tools/hwdb.c
index 3e591f78f..e89bedfc7 100644
--- a/tools/hwdb.c
+++ b/tools/hwdb.c
@@ -29,6 +29,15 @@
#include <bluetooth/bluetooth.h>
+static const struct {
+ uint16_t vendor;
+ uint16_t product;
+ const char *str;
+} product_table[] = {
+ { 0x0078, 0x0001, "Nike+ FuelBand" },
+ { }
+};
+
int main(int argc, char *argv[])
{
uint16_t id;
@@ -41,6 +50,7 @@ int main(int argc, char *argv[])
for (id = 0;; id++) {
char *str;
+ int i;
str = bt_compidtostr(id);
if (!str)
@@ -55,6 +65,17 @@ int main(int argc, char *argv[])
printf("bluetooth:v%04X*\n", id);
printf(" ID_VENDOR_FROM_DATABASE=%s\n", str);
printf("\n");
+
+ for (i = 0; product_table[i].str; i++) {
+ if (product_table[i].vendor != id)
+ continue;
+
+ printf("bluetooth:v%04Xp%04X*\n",
+ id, product_table[i].product);
+ printf(" ID_PRODUCT_FROM_DATABASE=%s\n",
+ product_table[i].str);
+ printf("\n");
+ }
}
return 0;