summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenys Vlasenko2010-06-27 16:47:40 +0200
committerDenys Vlasenko2010-06-27 16:47:40 +0200
commitfa1b3705a336f2ff4b6b841e12ae1edaba742d18 (patch)
tree034fb179cf3cef0dbee98b7deb96885621ea2b89 /util-linux
parent77cc2c5738d780b97b56af49510ed64d61ad2e2d (diff)
downloadbusybox-fa1b3705a336f2ff4b6b841e12ae1edaba742d18.zip
busybox-fa1b3705a336f2ff4b6b841e12ae1edaba742d18.tar.gz
mount: fix a case when sometimes error message is not printed
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mount.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index aed6f79..9107e43 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -1718,9 +1718,9 @@ static int singlemount(struct mntent *mp, int ignore_busy)
// If we know the fstype (or don't need to), jump straight
// to the actual mount.
- if (mp->mnt_type || (vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE)))
+ if (mp->mnt_type || (vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE))) {
rc = mount_it_now(mp, vfsflags, filteropts);
- else {
+ } else {
// Loop through filesystem types until mount succeeds
// or we run out
@@ -1756,7 +1756,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
if (errno == EBUSY && ignore_busy)
return 0;
- if (rc < 0)
+ if (rc != 0)
bb_perror_msg("mounting %s on %s failed", mp->mnt_fsname, mp->mnt_dir);
return rc;
}