mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-11 21:51:57 +00:00
Do not hotplug enable a device if devices have been specified and the hotplug device falls outside this range.
This commit is contained in:
parent
6e014b0f8e
commit
5f2c4f13f9
@ -7140,8 +7140,12 @@ static void hotplug_process()
|
|||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
for (i = 0; i < new_devices; i++) {
|
for (i = 0; i < new_devices; i++) {
|
||||||
struct cgpu_info *cgpu = devices[total_devices + i];
|
struct cgpu_info *cgpu;
|
||||||
enable_device(cgpu);
|
int dev_no = total_devices + i;
|
||||||
|
|
||||||
|
cgpu = devices[dev_no];
|
||||||
|
if (!opt_devs_enabled || (opt_devs_enabled && devices_enabled[dev_no]))
|
||||||
|
enable_device(cgpu);
|
||||||
cgpu->cgminer_stats.getwork_wait_min.tv_sec = MIN_SEC_UNSET;
|
cgpu->cgminer_stats.getwork_wait_min.tv_sec = MIN_SEC_UNSET;
|
||||||
cgpu->rolling = cgpu->total_mhashes = 0;
|
cgpu->rolling = cgpu->total_mhashes = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user