Skip to content

Commit

Permalink
fix(resume): correct call to block_is_netdevice function
Browse files Browse the repository at this point in the history
The block_is_netdevice function requires the device in <maj:min>
format, but the swap_devs array is populated with the content of
/proc/swaps, which prints the devices using their paths from /dev.

This causes the check method to never detect if swap is mounted on a
network device.
  • Loading branch information
aafeijoo-suse authored and johannbg committed Apr 9, 2022
1 parent 0afa840 commit a7a4b76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules.d/95resume/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ check() {
swap_on_netdevice() {
local _dev
for _dev in "${swap_devs[@]}"; do
block_is_netdevice "$_dev" && return 0
block_is_netdevice "$(get_maj_min "$_dev")" && return 0
done
return 1
}
Expand Down

0 comments on commit a7a4b76

Please sign in to comment.