From fd9ccd513b97a59a913057764d45b05ca3c94f0b Mon Sep 17 00:00:00 2001 From: chickendrop89 Date: Fri, 19 Jul 2024 12:29:25 +0200 Subject: [PATCH] mss: binary: swappiness: throw a warning if the command value is 0 Signed-off-by: chickendrop89 --- system/bin/magiskswap | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/bin/magiskswap b/system/bin/magiskswap index 1ede0ac..d57ab1b 100755 --- a/system/bin/magiskswap +++ b/system/bin/magiskswap @@ -185,6 +185,11 @@ case $COMMAND in elif [ "$VALUE" -ge 0 ] && [ "$VALUE" -le 200 ]; then + if [ "$VALUE" -eq 0 ]; + then + cprint "WARNING: Setting swappiness to 0 stops swapping to disk completely" + cprint "WARNING: Use this with caution, as OOM situations might occur" + fi if [ "$VALUE" -gt 100 ]; then cprint "WARNING: +100 swappiness is only compatible with Linux 5.7 and later"