Commit 68ddec22152873f0017cfbb5ad9b878e7e510af1

Con Kolivas 2014-03-28T17:16:33

Display BF1 serial number as its unique identifier

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/driver-bitfury.c b/driver-bitfury.c
index 98d69eb..38aa45a 100644
--- a/driver-bitfury.c
+++ b/driver-bitfury.c
@@ -161,9 +161,10 @@ static bool bf1_getinfo(struct cgpu_info *bitfury, struct bitfury_info *info)
 	info->version = buf[1];
 	memcpy(&info->product, buf + 2, 8);
 	memcpy(&info->serial, buf + 10, 4);
+	bitfury->unique_id = bin2hex((unsigned char *)buf + 10, 4);
 
-	applog(LOG_INFO, "%s %d: Getinfo returned version %d, product %s serial %08x", bitfury->drv->name,
-	       bitfury->device_id, info->version, info->product, info->serial);
+	applog(LOG_INFO, "%s %d: Getinfo returned version %d, product %s serial %s", bitfury->drv->name,
+	       bitfury->device_id, info->version, info->product, bitfury->unique_id);
 	bf1_empty_buffer(bitfury);
 	return true;
 }