[devtools] is_same_fs() in lib/archroot.sh should use $1 and $2, not $1 and $1

Message ID 20190417111635.28490-1-arch@eckner.net
State Accepted
Delegated to: Jelle van der Waa
Headers show
Series
  • [devtools] is_same_fs() in lib/archroot.sh should use $1 and $2, not $1 and $1
Related show

Commit Message

Eli Schwartz via arch-projects April 17, 2019, 11:16 a.m. UTC
From: Erich Eckner <git@eckner.net>

The old behaviour would always evaluate to true - this is certainly not
what that function should do.

Signed-off-by: Erich Eckner <git@eckner.net>
---
 lib/archroot.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/lib/archroot.sh b/lib/archroot.sh
index f2796034..2c03c827 100644
--- a/lib/archroot.sh
+++ b/lib/archroot.sh
@@ -42,7 +42,7 @@  is_subvolume() {
 # return : whether $path_a and $path_b are on the same filesystem
 ##
 is_same_fs() {
-	[[ "$(stat -c %d "$1")" == "$(stat -c %d "$1")" ]]
+	[[ "$(stat -c %d "$1")" == "$(stat -c %d "$2")" ]]
 }
 
 ##