diff options
author | Paul Lawrence <paullawrence@google.com> | 2014-09-09 10:44:51 -0700 |
---|---|---|
committer | Paul Lawrence <paullawrence@google.com> | 2014-09-11 17:31:49 -0700 |
commit | cf234dc7e081ac4063c3c5ddcdd4da40c82d51cb (patch) | |
tree | 749d82aeca848cf7ed600162567c2c61938f77a4 /fs_mgr/fs_mgr.c | |
parent | c3e6eb21b58ae3067ed03358687d1edb851f2abf (diff) | |
download | core-cf234dc7e081ac4063c3c5ddcdd4da40c82d51cb.tar.gz core-cf234dc7e081ac4063c3c5ddcdd4da40c82d51cb.tar.bz2 core-cf234dc7e081ac4063c3c5ddcdd4da40c82d51cb.zip |
Preserve errno from fsmgr_do_mount
Bug: 17358530
Change-Id: I4cd7403c0b7c4f878d6afa5199f998e6f614adb9
Diffstat (limited to 'fs_mgr/fs_mgr.c')
-rw-r--r-- | fs_mgr/fs_mgr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs_mgr/fs_mgr.c b/fs_mgr/fs_mgr.c index 3f94af5e7..91e6c3326 100644 --- a/fs_mgr/fs_mgr.c +++ b/fs_mgr/fs_mgr.c @@ -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); |