1*7078Smjnelson#! /usr/bin/python 2*7078Smjnelson# 3*7078Smjnelson# CDDL HEADER START 4*7078Smjnelson# 5*7078Smjnelson# The contents of this file are subject to the terms of the 6*7078Smjnelson# Common Development and Distribution License (the "License"). 7*7078Smjnelson# You may not use this file except in compliance with the License. 8*7078Smjnelson# 9*7078Smjnelson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7078Smjnelson# or http://www.opensolaris.org/os/licensing. 11*7078Smjnelson# See the License for the specific language governing permissions 12*7078Smjnelson# and limitations under the License. 13*7078Smjnelson# 14*7078Smjnelson# When distributing Covered Code, include this CDDL HEADER in each 15*7078Smjnelson# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7078Smjnelson# If applicable, add the following below this CDDL HEADER, with the 17*7078Smjnelson# fields enclosed by brackets "[]" replaced with your own identifying 18*7078Smjnelson# information: Portions Copyright [yyyy] [name of copyright owner] 19*7078Smjnelson# 20*7078Smjnelson# CDDL HEADER END 21*7078Smjnelson# 22*7078Smjnelson 23*7078Smjnelson# 24*7078Smjnelson# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 25*7078Smjnelson# Use is subject to license terms. 26*7078Smjnelson# 27*7078Smjnelson# ident "%Z%%M% %I% %E% SMI" 28*7078Smjnelson# 29*7078Smjnelson 30*7078Smjnelson# 31*7078Smjnelson# Check for valid SMI copyright notices in source files. 32*7078Smjnelson# 33*7078Smjnelson 34*7078Smjnelsonimport sys, os 35*7078Smjnelson 36*7078Smjnelsonsys.path.append(os.path.join(os.path.dirname(__file__), '../lib/python')) 37*7078Smjnelsonsys.path.append(os.path.join(os.path.dirname(__file__), '..')) 38*7078Smjnelson 39*7078Smjnelsonfrom onbld.Checks.Copyright import copyright 40*7078Smjnelson 41*7078Smjnelsonret = 0 42*7078Smjnelsonfor filename in sys.argv[1:]: 43*7078Smjnelson try: 44*7078Smjnelson fin = open(filename, 'r') 45*7078Smjnelson except IOError, e: 46*7078Smjnelson sys.stderr.write("failed to open '%s': %s\n" % 47*7078Smjnelson (e.filename, e.strerror)) 48*7078Smjnelson continue 49*7078Smjnelson 50*7078Smjnelson ret |= copyright(fin, output=sys.stdout) 51*7078Smjnelson fin.close() 52*7078Smjnelson 53*7078Smjnelsonsys.exit(ret) 54