summaryrefslogtreecommitdiffstats
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:52 +0100
commitecd90bc6aa63da2aef2513ac090d4b426b2b719c (patch)
tree5310d098856a16f77b639181a990b306b33b8b50
parent2435d807d1dd83f821367d4ec7d5e31028cb624e (diff)
downloadpoky-ecd90bc6aa63da2aef2513ac090d4b426b2b719c.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. (From OE-Core rev: e5403f55a1e9b1747535450fd95f499c85211771) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 @@
1Upstream-Status: Pending
2
3The current behaviour of busybox is to try all fstype when automounting
4even when no media exists. The util-linux mount command bails when no
5media exists, so change the behaviour of busybox to do the same.
6
7It could also be argued that the KERN_INFO message from btrfs could be
8removed, but that would be harder to accomplish.
9
10Signed-off-by: Saul Wold <sgw@linux.intel.com>
11
12
13Index: busybox-1.20.2/util-linux/mount.c
14===================================================================
15--- busybox-1.20.2.orig/util-linux/mount.c
16+++ busybox-1.20.2/util-linux/mount.c
17@@ -598,7 +598,13 @@ static int mount_it_now(struct mntent *m
18 break;
19 errno = errno_save;
20 }
21-
22+ /*
23+ * Break if there is no media, no point retrying for all
24+ * fs types since there is no media available
25+ */
26+ if ((rc == -1) && (errno == ENOMEDIUM || errno == ENODEV)) {
27+ bb_perror_msg_and_die("mounting %s on %s failed", mp->mnt_fsname, mp->mnt_dir);
28+ }
29 if (!rc || (vfsflags & MS_RDONLY) || (errno != EACCES && errno != EROFS))
30 break;
31 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 \
31 file://busybox-syslog.service.in \ 31 file://busybox-syslog.service.in \
32 file://busybox-klogd.service.in \ 32 file://busybox-klogd.service.in \
33 file://testsuite-du-du-k-works-fix-false-positive.patch \ 33 file://testsuite-du-du-k-works-fix-false-positive.patch \
34 file://strict-atime.patch" 34 file://strict-atime.patch \
35 file://fail_on_no_media.patch"
35 36
36SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c" 37SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
37SRC_URI[tarball.sha256sum] = "eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882" 38SRC_URI[tarball.sha256sum] = "eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"