mirror of
https://github.com/thepigeongenerator/cpusetcores.git
synced 2025-12-18 06:25:46 +01:00
fix: when -v is not set, not all cpus are disabled
removed the else if check, and use a continue, if pattern instead
This commit is contained in:
10
src/main.c
10
src/main.c
@@ -50,10 +50,14 @@ int32_t main(int32_t argc, char** argv) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cpu_setter(id, false, opts) && (opts & OPT_VERBOSE))
|
if (cpu_setter(id, false, opts) && (opts & OPT_VERBOSE)) {
|
||||||
printf(cpu_set_log, id, 0);
|
printf(cpu_set_log, id, 0);
|
||||||
else if (!(opts & OPT_SET_ALL))
|
continue;
|
||||||
break; // break if OPT_SET_ALL is not set (assuming the rest of the CPUs are already off)
|
}
|
||||||
|
|
||||||
|
// break if OPT_SET_ALL is not set (assuming the rest of the CPUs are already off)
|
||||||
|
if (!(opts & OPT_SET_ALL))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((opts & OPT_LIST_CORES))
|
if ((opts & OPT_LIST_CORES))
|
||||||
|
|||||||
Reference in New Issue
Block a user