Skip to contentSkip to conversation

bash-completion: fstrim: use mountpoint, not device

PATCH Applied Andreas Henriksson 2 participants 2 messages Nov 12, 2015 – Nov 13, 2015 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bash-completion: fstrim: use mountpoint, not device

fstrim takes mountpoint as argument but the bash completion was completing it to a device node.

Addresses: http://bugs.debian.org/804833

---
 bash-completion/fstrim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bash-completion/fstrim +1 -1
index 7d3cde9..726ddd9 100644
@@ -27,7 +27,7 @@ _fstrim_module()
 			;;
 	esac
 	local MPOINTS
-	MPOINTS=$(findmnt -rno SOURCE | grep ^/dev)
+	MPOINTS=$(findmnt -rno SOURCE,TARGET | awk '/^\/dev/{print $2}')
 	COMPREPLY=( $(compgen -W "$MPOINTS" -- $cur) )
 	return 0
 }
Signature · 1 line
2.1.4
maintainer Applied
#1 lore raw
Quoted 2 lines · Andreas Henriksson
 bash-completion/fstrim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com