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

Commit cf234dc7 authored by Paul Lawrence's avatar Paul Lawrence
Browse files

Preserve errno from fsmgr_do_mount

Bug: 17358530
Change-Id: I4cd7403c0b7c4f878d6afa5199f998e6f614adb9
parent c3e6eb21
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -433,7 +433,7 @@ int fs_mgr_do_mount(struct fstab *fstab, char *n_name, char *n_blk_device,
                    char *tmp_mount_point)
{
    int i = 0;
    int ret = -1;
    int ret = FS_MGR_DOMNT_FAILED;
    int mount_errors = 0;
    int first_mount_errno = 0;
    char *m;
@@ -493,7 +493,11 @@ int fs_mgr_do_mount(struct fstab *fstab, char *n_name, char *n_blk_device,
    if (mount_errors) {
        ERROR("Cannot mount filesystem on %s at %s. error: %s\n",
            n_blk_device, m, strerror(first_mount_errno));
        ret = -1;
        if (first_mount_errno == EBUSY) {
            ret = FS_MGR_DOMNT_BUSY;
        } else {
            ret = FS_MGR_DOMNT_FAILED;
        }
    } else {
        /* We didn't find a match, say so and return an error */
        ERROR("Cannot find mount point %s in fstab\n", fstab->recs[i].mount_point);
+3 −0
Original line number Diff line number Diff line
@@ -59,6 +59,9 @@ void fs_mgr_free_fstab(struct fstab *fstab);
#define FS_MGR_MNTALL_DEV_MIGHT_BE_ENCRYPTED 1
#define FS_MGR_MNTALL_DEV_NOT_ENCRYPTED 0
int fs_mgr_mount_all(struct fstab *fstab);

#define FS_MGR_DOMNT_FAILED -1
#define FS_MGR_DOMNT_BUSY -2
int fs_mgr_do_mount(struct fstab *fstab, char *n_name, char *n_blk_device,
                    char *tmp_mount_point);
int fs_mgr_do_tmpfs_mount(char *n_name);