summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan GUILLOT <jonathan@joggee.fr>2024-01-24 13:29:19 +0000
committerSteve Sakoman <steve@sakoman.com>2024-02-22 04:34:14 -1000
commitb5781286ad8a3181f7ebec97dbb2963fc1105bea (patch)
tree927e170cdd518d94994e2965e39f680fc5de24d4
parent9b94baed2630022bc06aade827ac794597fa6407 (diff)
downloadpoky-b5781286ad8a3181f7ebec97dbb2963fc1105bea.tar.gz
udev-extraconf: fix unmount directories containing octal-escaped chars
USB devices are auto-mounted in a directory named like theirs labels. Special characters like whitespace are octal-escaped in /proc/mounts output. Using directly this output file as an argument for umount failed and the mount directory can't be removed as still busy. Using printf allows these special characters to be unescaped. (From OE-Core rev: c3c31248233356a04db1d5ed375b647656d80fa0) Signed-off-by: Jonathan GUILLOT <jonathan@joggee.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 37f17625d931a06888388682dc2b1f5a2d298125) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-core/udev/udev-extraconf/mount.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index b7e86dbc0e..6cb0a9fea8 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -196,7 +196,7 @@ if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [
196 logger "mount.sh/remove" "cleaning up $DEVNAME, was mounted by the auto-mounter" 196 logger "mount.sh/remove" "cleaning up $DEVNAME, was mounted by the auto-mounter"
197 for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " ` 197 for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
198 do 198 do
199 $UMOUNT $mnt 199 $UMOUNT "`printf $mnt`"
200 done 200 done
201 # Remove mount directory created by the auto-mounter 201 # Remove mount directory created by the auto-mounter
202 # and clean up our tmp cache file 202 # and clean up our tmp cache file