Diff between 7523618f3980e3d1f57b302fb1326d7154192969 and 38a59587401ee22dbadf874ff484b14fb4811fb6

Changed Files

File Additions Deletions Status
mgmt/main.c +13 -0 modified

Full Patch

diff --git a/mgmt/main.c b/mgmt/main.c
index 7a572f4..884c8c0 100644
--- a/mgmt/main.c
+++ b/mgmt/main.c
@@ -480,17 +480,30 @@ static void index_rsp(int mgmt_sk, uint16_t op, uint16_t id, uint8_t status,
 		exit(EXIT_FAILURE);
 	}
 
+	if (monitor)
+		printf("Index list with %u item%s\n",
+						count, count > 1 ? "s" : "");
+
+	if (monitor && count > 0)
+		printf("\t");
+
 	for (i = 0; i < count; i++) {
 		uint16_t index;
 
 		index = bt_get_le16(&rp->index[i]);
 
+		if (monitor)
+			printf("hci%u ", index);
+
 		if (mgmt_send_cmd(mgmt_sk, MGMT_OP_READ_INFO, index, NULL,
 					0, info_rsp, NULL) < 0) {
 			fprintf(stderr, "Unable to send read_info cmd\n");
 			exit(EXIT_FAILURE);
 		}
 	}
+
+	if (monitor && count > 0)
+		printf("\n");
 }
 
 static void cmd_info(int mgmt_sk, int argc, char **argv)