From a7ceb04cb7d8c128c966344aef8f68060196604e Mon Sep 17 00:00:00 2001 From: msdx321 Date: Sat, 5 May 2018 03:50:06 -0400 Subject: [PATCH] Fix early mount on S9/S9+ 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 --- native/jni/core/magiskinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/jni/core/magiskinit.c b/native/jni/core/magiskinit.c index 4c1cdf60c..10535caf8 100644 --- a/native/jni/core/magiskinit.c +++ b/native/jni/core/magiskinit.c @@ -131,7 +131,7 @@ static int setup_block(struct device *dev, const char *partname) { buffer[size] = '\0'; close(fd); parse_device(dev, buffer); - if (strcmp(dev->partname, partname) == 0) { + if (strcasecmp(dev->partname, partname) == 0) { snprintf(dev->path, sizeof(dev->path), "/dev/block/%s", dev->devname); found = 1; break;