]> granicus.if.org Git - zfs/commitdiff
OpenZFS 6754 - zfs-tests: get_substr() function is redundant
authorYuri Pankov <yuri.pankov@gmail.com>
Fri, 18 Mar 2016 21:11:23 +0000 (00:11 +0300)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 13 Feb 2017 20:11:25 +0000 (12:11 -0800)
Authored by: Yuri Pankov <yuri.pankov@gmail.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Ported-by: George Melikov <mail@gmelikov.ru>
OpenZFS-issue: https://www.illumos.org/issues/6754
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/01ff411
Closes #5787

Porting notes:
- Only the ACL test cases used this function and they have been
  dropped from ZoL since Linux used POSIX style ACLs.

  - functional/acl/nontrivial/zfs_acl_chmod_aclmode_001_pos.ksh
  - functional/acl/nontrivial/zfs_acl_chmod_inherit_003_pos.ksh
  - functional/acl/nontrivial/zfs_acl_chmod_rwx_002_pos.ksh

tests/zfs-tests/include/libtest.shlib

index 22b79b15a7c38ee40e8f7ca483b2cfd1f4add940..da80407a962f04d01b596ac975f502e579b83d11 100644 (file)
 #
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
-#
-
-#
 # Copyright (c) 2012, 2015 by Delphix. All rights reserved.
+# Copyright 2016 Nexenta Systems, Inc.
 #
 
 . ${STF_TOOLS}/include/logapi.shlib
@@ -2726,21 +2724,6 @@ function get_rootpool
        fi
 }
 
-#
-# Get the sub string from specified source string
-#
-# $1 source string
-# $2 start position. Count from 1
-# $3 offset
-#
-function get_substr #src_str pos offset
-{
-       typeset pos offset
-
-       $ECHO $1 | \
-               $NAWK -v pos=$2 -v offset=$3 '{print substr($0, pos, offset)}'
-}
-
 #
 # Check if the given device is physical device
 #