Browse Source

Attempt to probe /dev/cu.usb* for fallback "-S all"

This is used for at least Mac OS X serial USB.
Luke Dashjr 12 years ago
parent
commit
bef40fd313
1 changed files with 3 additions and 0 deletions
  1. 3 0
      miner.c

+ 3 - 0
miner.c

@@ -714,11 +714,14 @@ tryagain: ;
 	memcpy(devpath, devdir, devdirlen);
 	memcpy(devpath, devdir, devdirlen);
 	devpath[devdirlen] = '/';
 	devpath[devdirlen] = '/';
 	while ( (de = readdir(D)) ) {
 	while ( (de = readdir(D)) ) {
+		if (!strncmp(de->d_name, "cu.usb", 6))
+			goto trydev;
 		if (strncmp(de->d_name, "tty", 3))
 		if (strncmp(de->d_name, "tty", 3))
 			continue;
 			continue;
 		if (strncmp(&de->d_name[3], "USB", 3) && strncmp(&de->d_name[3], "ACM", 3))
 		if (strncmp(&de->d_name[3], "USB", 3) && strncmp(&de->d_name[3], "ACM", 3))
 			continue;
 			continue;
 		
 		
+trydev:
 		strcpy(devfile, de->d_name);
 		strcpy(devfile, de->d_name);
 		applog(LOG_DEBUG, "scan-serial: /dev glob all-adding %s", devpath);
 		applog(LOG_DEBUG, "scan-serial: /dev glob all-adding %s", devpath);
 		string_elist_add(devpath, &scan_devices);
 		string_elist_add(devpath, &scan_devices);