summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan GUILLOT <jonathan@joggee.fr>2024-01-24 13:29:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-26 16:06:29 +0000
commitb219e0c9ffeb1b9e7c7aa0cf9a7156fe8dd17fa9 (patch)
tree2ce0d109920ab0ee7f20cc0e5749c068323c3d19
parentd46ca2a7765d244ab727fa20172ddc3138657a6e (diff)
downloadpoky-b219e0c9ffeb1b9e7c7aa0cf9a7156fe8dd17fa9.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: 37f17625d931a06888388682dc2b1f5a2d298125) 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>
-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 0cd51fcde8..c19e2aa68a 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -211,7 +211,7 @@ if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [
211 logger "mount.sh/remove" "cleaning up $DEVNAME, was mounted by the auto-mounter" 211 logger "mount.sh/remove" "cleaning up $DEVNAME, was mounted by the auto-mounter"
212 for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " ` 212 for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
213 do 213 do
214 $UMOUNT $mnt 214 $UMOUNT "`printf $mnt`"
215 done 215 done
216 # Remove mount directory created by the auto-mounter 216 # Remove mount directory created by the auto-mounter
217 # and clean up our tmp cache file 217 # and clean up our tmp cache file