Browse Source

modminer: Check identification begins with "ModMiner" to avoid false detection

Luke Dashjr 12 years ago
parent
commit
610008c077
1 changed files with 2 additions and 0 deletions
  1. 2 0
      driver-modminer.c

+ 2 - 0
driver-modminer.c

@@ -130,6 +130,8 @@ modminer_detect_one(const char *devpath)
 	if (len < 1)
 		bailout(LOG_DEBUG, "ModMiner detect: no response to version request from %s", devpath);
 	buf[len] = '\0';
+	if (strncasecmp(buf, "ModMiner", 8))
+		bailout(LOG_DEBUG, "%s: %s: response did not begin with 'ModMiner'", __func__, devpath);
 	char*devname = strdup(buf);
 	applog(LOG_DEBUG, "ModMiner identified as: %s", devname);