aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2013-04-09 23:25:54 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-10 12:56:48 +0100
commite5403f55a1e9b1747535450fd95f499c85211771 (patch)
treea0d48739b2ab455625dc973a6d885ee83eb7ee61 /meta/recipes-core/busybox
parent48e8b613b3f5c7b1d917bf3147606d44072ce49e (diff)
downloadopenembedded-core-e5403f55a1e9b1747535450fd95f499c85211771.tar.gz
busybox: fail on no media
The current behaviour of busybox is to try all fstype when automounting even when no media exists. The util-linux mount command bails when no media exists, so change the behaviour of busybox to do the same. It could also be argued that the KERN_INFO message from btrfs could be removed, but that would be harder to accomplish. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox')
-rw-r--r--meta/recipes-core/busybox/busybox-1.20.2/fail_on_no_media.patch31
-rw-r--r--meta/recipes-core/busybox/busybox_1.20.2.bb3
2 files changed, 33 insertions, 1 deletions
diff --git a/meta/recipes-core/busybox/busybox-1.20.2/fail_on_no_media.patch b/meta/recipes-core/busybox/busybox-1.20.2/fail_on_no_media.patch
new file mode 100644
index 0000000000..aa2cd25266
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.20.2/fail_on_no_media.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Pending
+
+The current behaviour of busybox is to try all fstype when automounting
+even when no media exists. The util-linux mount command bails when no
+media exists, so change the behaviour of busybox to do the same.
+
+It could also be argued that the KERN_INFO message from btrfs could be
+removed, but that would be harder to accomplish.
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+
+Index: busybox-1.20.2/util-linux/mount.c
+===================================================================
+--- busybox-1.20.2.orig/util-linux/mount.c
++++ busybox-1.20.2/util-linux/mount.c
+@@ -598,7 +598,13 @@ static int mount_it_now(struct mntent *m
+ break;
+ errno = errno_save;
+ }
+-
++ /*
++ * Break if there is no media, no point retrying for all
++ * fs types since there is no media available
++ */
++ if ((rc == -1) && (errno == ENOMEDIUM || errno == ENODEV)) {
++ bb_perror_msg_and_die("mounting %s on %s failed", mp->mnt_fsname, mp->mnt_dir);
++ }
+ if (!rc || (vfsflags & MS_RDONLY) || (errno != EACCES && errno != EROFS))
+ break;
+ if (!(vfsflags & MS_SILENT))
diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb b/meta/recipes-core/busybox/busybox_1.20.2.bb
index c09a492dbd..401c1ebc16 100644
--- a/meta/recipes-core/busybox/busybox_1.20.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.20.2.bb
@@ -31,7 +31,8 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://busybox-syslog.service.in \
file://busybox-klogd.service.in \
file://testsuite-du-du-k-works-fix-false-positive.patch \
- file://strict-atime.patch"
+ file://strict-atime.patch \
+ file://fail_on_no_media.patch"
SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
SRC_URI[tarball.sha256sum] = "eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"