lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 24 Nov 2015 11:39:56 +0100
From:	Jan Kara <jack@...e.cz>
To:	fstests@...r.kernel.org
Cc:	linux-ext4@...r.kernel.org, Jan Kara <jack@...e.cz>
Subject: [PATCH 1/3] common: Factor out function to get OS name

Signed-off-by: Jan Kara <jack@...e.cz>
---
 common/rc | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/common/rc b/common/rc
index 4c2f42c8d0eb..81418280f163 100644
--- a/common/rc
+++ b/common/rc
@@ -2188,6 +2188,18 @@ _full_platform_details()
      echo "$os/$platform $host $kernel"
 }
 
+_get_os_name()
+{
+	if [ "`uname`" == "IRIX64" ] || [ "`uname`" == "IRIX" ]; then
+		echo 'irix'
+	elif [ "`uname`" == "Linux" ]; then
+		echo 'linux'
+	else
+		echo Unknown operating system: `uname`
+		exit
+	fi
+}
+
 _link_out_file()
 {
 	if [ -z "$1" -o -z "$2" ]; then
@@ -2195,14 +2207,8 @@ _link_out_file()
 		exit
 	fi
 	rm -f $2
-	if [ "`uname`" == "IRIX64" ] || [ "`uname`" == "IRIX" ]; then
-		ln -s $1.irix $2
-	elif [ "`uname`" == "Linux" ]; then
-		ln -s $1.linux $2
-	else
-		echo Error test $seq does not run on the operating system: `uname`
-		exit
-	fi
+	SUFFIX=$(_get_os_name())
+	ln -s $1.$SUFFIX $2
 }
 
 _die()
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ