Diff between 0bca38fad052971b36eb03634dee158b5911cb51 and 9c5e0d4ea662604c8f74c8ea43dc74326bec8eff

Changed Files

File Additions Deletions Status
tools/hwdb.c +21 -0 modified

Full Patch

diff --git a/tools/hwdb.c b/tools/hwdb.c
index 3e591f7..e89bedf 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;