mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-10-06 04:55:13 -04:00
Don't override arguments
This commit is contained in:
1 parent
c5758b3f2d
commit
82ea9db9fd
1 file changed
+2
-2
@@ -386,8 +386,8 @@ bool MagiskInit::read_dt_fstab(const char *name, char *partname, char *partfs) {
|
||||
read(fd, path, sizeof(path));
|
||||
close(fd);
|
||||
// Some custom treble use different names, so use what we read
|
||||
name = rtrim(strrchr(path, '/') + 1);
|
||||
sprintf(partname, "%s%s", name, strend(name, cmd.slot) ? cmd.slot : "");
|
||||
char *part = rtrim(strrchr(path, '/') + 1);
|
||||
sprintf(partname, "%s%s", part, strend(part, cmd.slot) ? cmd.slot : "");
|
||||
sprintf(path, "%s/fstab/%s/type", cmd.dt_dir, name);
|
||||
if ((fd = xopen(path, O_RDONLY | O_CLOEXEC)) >= 0) {
|
||||
read(fd, partfs, 32);
|
||||
|
||||
Reference in new issue
Block a user