Patchwork [1/2] udev-extraconf: Add -o silent to auto mount

login
register
mail settings
Submitter Saul Wold
Date April 10, 2013, 6:25 a.m.
Message ID <1365575154-25919-1-git-send-email-sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/47809/
State New
Headers show

Comments

Saul Wold - April 10, 2013, 6:25 a.m.
This will silence some of the noisy output from mount and the kernel
when trying to automount filesystems or devices

[YOCTO #3935]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-core/udev/udev-extraconf/mount.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Hongxu Jia - April 10, 2013, 9:34 a.m.
On 04/10/2013 02:25 PM, Saul Wold wrote:
> This will silence some of the noisy output from mount and the kernel
> when trying to automount filesystems or devices
>
> [YOCTO #3935]
>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
>   meta/recipes-core/udev/udev-extraconf/mount.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
> index 99c76b2..7b58361 100644
> --- a/meta/recipes-core/udev/udev-extraconf/mount.sh
> +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
> @@ -22,7 +22,7 @@ automount() {
>   
>   	! test -d "/media/$name" && mkdir -p "/media/$name"
>   	
> -	if ! $MOUNT -t auto $DEVNAME "/media/$name"
> +	if ! $MOUNT -o silent -t auto $DEVNAME "/media/$name"
>   	then
>   		#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
>   		rm_dir "/media/$name"
I have tested on atom-pc,  mount option "silent" is unrecognized.
...
root@atom-pc:~# mount -o silent -t auto /dev/sdb1 /media/sdb1
mount: mounting /dev/sdb1 on /media/sdb1 failed: Invalid argument
...

Without this option, mount is ok
...
root@atom-pc:~# mount -t auto /dev/sdb1 /media/sdb1
root@atom-pc:~# mount
/dev/sdb1 on /media/sdb1 type ext4 (rw,relatime,data=ordered)
...

root@atom-pc:~# which mount
/bin/mount
root@atom-pc:~# ls /bin/mount -al
lrwxrwxrwx    1 root     root            12 Apr 10 07:44 /bin/mount -> 
/bin/busybox

branch master 6d4d42d63db4c3fcffd831ce359599f3ee1d710e

Thanks,
Hongxu

Patch

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 99c76b2..7b58361 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -22,7 +22,7 @@  automount() {
 
 	! test -d "/media/$name" && mkdir -p "/media/$name"
 	
-	if ! $MOUNT -t auto $DEVNAME "/media/$name"
+	if ! $MOUNT -o silent -t auto $DEVNAME "/media/$name"
 	then
 		#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
 		rm_dir "/media/$name"