Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c31ffe9 authored by NIEJuhu's avatar NIEJuhu Committed by Juhu Nie
Browse files

fs_mgr: fix errno setted by mount_with_alternatives



mount_with_alternatives should set errno to match the 1st mount failure.

Bug: N/A
Test: run `fs_mgr -a <fake_fstab>` and check dmesg log
Change-Id: If4148d327f75c659b843e95f85568ea49c5d0180
Signed-off-by: default avatarNIEJuhu <niejuhu@xiaomi.com>
parent e1bfafd2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -563,9 +563,11 @@ static int mount_with_alternatives(struct fstab *fstab, int start_idx, int *end_
                }
            } else {
                fs_stat |= FS_STAT_FULL_MOUNT_FAILED;
                /* back up errno for crypto decisions */
                /* back up the first errno for crypto decisions */
                if (mount_errno == 0) {
                    mount_errno = errno;
                }
            }
            log_fs_stat(fstab->recs[i].blk_device, fs_stat);
    }