Skip to content

Commit

Permalink
Merge pull request #733 from marcan/fix-cpu-online
Browse files Browse the repository at this point in the history
utils.commands: Fix CPU online detection when not present
  • Loading branch information
yarda authored Jan 29, 2025
2 parents 5452ada + 13dc684 commit 8b17fe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tuned/utils/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def get_active_option(self, options, dosplit = True):
def is_cpu_online(self, cpu):
scpu = str(cpu)
# CPU0 is always online
return cpu == "0" or self.read_file("/sys/devices/system/cpu/cpu%s/online" % scpu, no_error = True).strip() == "1"
return cpu == "0" or self.read_file("/sys/devices/system/cpu/cpu%s/online" % scpu, err_ret = "1", no_error = True).strip() == "1"

# Converts hexadecimal CPU mask to CPU list
def hex2cpulist(self, mask):
Expand Down

0 comments on commit 8b17fe9

Please sign in to comment.