Patchwork busybox: fix mount issue

login
register
mail settings
Submitter Laurentiu Palcu
Date April 17, 2013, 1:52 p.m.
Message ID <1366206752-26309-1-git-send-email-laurentiu.palcu@intel.com>
Download mbox | patch
Permalink /patch/48439/
State Accepted
Commit ef0e1cc32d19390626a9da6a948632ffacb242ac
Headers show

Comments

Laurentiu Palcu - April 17, 2013, 1:52 p.m.
When the mount command is not given the filesystem type to mount, then
it will try all the known filesystems. However, when a filesystem is not
supported by the kernel, the mount function call will return ENODEV.

The following patch, ecd90bc6aa63da2aef2513ac090d4b426b2b719c,
introduced a problem because it bailed out on ENODEV too. Instead it should
have only bailed out on ENOMEDIUM.

[YOCTO #4308]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
Saul, Khem,

Would you guys give this a test? Mounting should work just fine now and my
tests didn't show any issues. I didn't test the 'fail on no media' case
though... If you can quickly test this, it would be nice.

Thanks,
Laurentiu


 .../busybox/busybox-1.20.2/fail_on_no_media.patch  |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Saul Wold - April 17, 2013, 3:04 p.m.
On 04/17/2013 06:52 AM, Laurentiu Palcu wrote:
> When the mount command is not given the filesystem type to mount, then
> it will try all the known filesystems. However, when a filesystem is not
> supported by the kernel, the mount function call will return ENODEV.
>
> The following patch, ecd90bc6aa63da2aef2513ac090d4b426b2b719c,
> introduced a problem because it bailed out on ENODEV too. Instead it should
> have only bailed out on ENOMEDIUM.
>
> [YOCTO #4308]
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Acked-by & Tested-by: Saul Wold <sgw@linux.intel.com>


> ---
> Saul, Khem,
>
> Would you guys give this a test? Mounting should work just fine now and my
> tests didn't show any issues. I didn't test the 'fail on no media' case
> though... If you can quickly test this, it would be nice.
>
> Thanks,
> Laurentiu
>
>
>   .../busybox/busybox-1.20.2/fail_on_no_media.patch  |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
> index aa2cd25..6745f16 100644
> --- 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
> @@ -23,7 +23,7 @@ Index: busybox-1.20.2/util-linux/mount.c
>   +		 * 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)) {
> ++		if (rc == -1 && errno == ENOMEDIUM) {
>   +			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))
>

Patch

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
index aa2cd25..6745f16 100644
--- 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
@@ -23,7 +23,7 @@  Index: busybox-1.20.2/util-linux/mount.c
 +		 * 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)) {
++		if (rc == -1 && errno == ENOMEDIUM) {
 +			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))