It's not important to check the return value of unlink(2) or even verify
that the file exists. If this code is running, it means the system has
rebooted, and thus the update file, if any, should be removed so that
MagiskManager doesn't keep displaying the same message. We also handle
this before we handle "disable" so that disabled modules don't keep
requesting a reboot to update.
Unlike other common OEMs, Samsung use uppper case partition name.
e.g: /dev/block/platform/11120000.ufs/by-name/SYSTEM
This will cause setup_block() fails to find a match partition.
Thus, we should use strcasecmp instead of strcmp.
Signed-off-by: msdx321 <msdx321@gmail.com>
This fixes an issue where if /system or /vendor was already mounted
prior to magiskinit running, then they would get unmounted.
Signed-off-by: Andrew Gunnerson <andrewgunnerson@gmail.com>