]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
Append cpus to hotplug list instead of selecting the last one
authorFelix Schnizlein <felix@schnizle.in>
Tue, 2 Jan 2018 09:18:54 +0000 (10:18 +0100)
committerFelix Schnizlein <felix@schnizle.in>
Tue, 13 Feb 2018 13:07:07 +0000 (14:07 +0100)
Due to a missing plus, available cpus where not collected but only
the last possible one was used.

Signed-off-by: Felix Schnizlein <fschnizlein@suse.com>
common/cpuhotplug

index 18baa183f5f07272d0c90e19c0947fbb1171625a..6a790fe0a19c251d5cbdf38934ba199ae409a21d 100644 (file)
@@ -26,7 +26,7 @@ _have_cpu_hotplug() {
        for cpu_dir in /sys/devices/system/cpu/cpu+([0-9]); do
                if [[ -w ${cpu_dir}/online ]]; then
                        cpu="${cpu_dir#/sys/devices/system/cpu/cpu}"
-                       HOTPLUGGABLE_CPUS=("$cpu")
+                       HOTPLUGGABLE_CPUS+=("$cpu")
                        CPUS_ONLINE_SAVED["$cpu"]="$(cat "${cpu_dir}/online")"
                fi
        done