Whamcloud - gitweb
Branch b1_6
authorliuy <liuy>
Tue, 14 Aug 2007 02:41:16 +0000 (02:41 +0000)
committerliuy <liuy>
Tue, 14 Aug 2007 02:41:16 +0000 (02:41 +0000)
b=11679
i=adilger, deen

add osc_to_ost() function

lustre/tests/test-framework.sh

index 19c687b..57bd529 100644 (file)
@@ -937,3 +937,15 @@ canonical_path() {
     (cd `dirname $1`; echo $PWD/`basename $1`)
 }
 
+########################
+# helper functions
+
+osc_to_ost()
+{
+    osc=$1
+    ost=`echo $1 | awk -F_ '{print $3}'`
+    if [ -z $ost ]; then
+        ost=`echo $1 | sed 's/-osc.*//'`
+    fi
+    echo $ost
+}