Print this page
10063 basic support for smatch
10153 checkpaths shouldn't check packaging exceptions

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/checkpaths.sh
          +++ new/usr/src/tools/scripts/checkpaths.sh
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12  # and limitations under the License.
  13   13  #
  14   14  # When distributing Covered Code, include this CDDL HEADER in each
  15   15  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16  # If applicable, add the following below this CDDL HEADER, with the
  17   17  # fields enclosed by brackets "[]" replaced with your own identifying
  18   18  # information: Portions Copyright [yyyy] [name of copyright owner]
  19   19  #
  20   20  # CDDL HEADER END
  21   21  #
  22      -
  23      -#
  24   22  # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  25   23  # Use is subject to license terms.
  26   24  #
       25 +# Copyright (c) 2018, Joyent, Inc.
  27   26  
  28   27  # Quis custodiet ipsos custodies?
  29   28  
  30   29  if [ -z "$SRC" ]; then
  31   30          SRC=$CODEMGR_WS/usr/src
  32   31  fi
  33   32  
  34   33  if [ -z "$CODEMGR_WS" -o ! -d "$CODEMGR_WS" -o ! -d "$SRC" ]; then
  35   34          echo "$0: must be run from within a workspace."
  36   35          exit 1
↓ open down ↓ 29 lines elided ↑ open up ↑
  66   65                  arch=sparc
  67   66                  ;;
  68   67          *i386|*i386-nd)
  69   68                  arch=i386
  70   69                  ;;
  71   70          *)
  72   71                  echo "$ROOT has unknown architecture." >&2
  73   72                  exit 1
  74   73                  ;;
  75   74          esac
  76      -        if [ -d $ROOT ]; then
  77      -                #
  78      -                # This is the old-style packaging exception list, from
  79      -                # the svr4-specific usr/src/pkgdefs
  80      -                #
  81      -                [ -f $SRC/pkgdefs/etc/exception_list_$arch ] && \
  82      -                        validate_paths '-s/\s*'$arch'$//'  \
  83      -                            -e ^usr/include/ike/ -b $ROOT \
  84      -                            $args $SRC/pkgdefs/etc/exception_list_$arch
  85      -                #
  86      -                # These are the new-style packaging exception lists,
  87      -                # from the repository-wide exception_lists/ directory.
  88      -                #
  89      -                e="$CODEMGR_WS/exception_lists/packaging"
  90      -                for f in $e; do
  91      -                        if [ -f $f ]; then
  92      -                                nawk 'NF == 1 || /[     ]\+'$arch'$/ { print; }' \
  93      -                                    < $f | validate_paths -b $ROOT -n $f
  94      -                        fi
  95      -                done
  96      -        fi
  97   75  done
  98   76  
  99   77  # Two entries in the findunref exception_list deal with things created
 100   78  # by nightly.  Otherwise, this test could be run on an unmodifed (and
 101   79  # unbuilt) workspace.  We handle this by flagging the one that is
 102   80  # present only on a built workspace (./*.out) and the one that's
 103   81  # present only after a run of findunref (./*.ref) with ISUSED, and
 104   82  # disabling all checks of them.  The assumption is that the entries
 105   83  # marked with ISUSED are always known to be good, thus the Latin quote
 106   84  # at the top of the file.
↓ open down ↓ 16 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX