xref: /titanic_50/usr/src/lib/libsmbfs/smb/lgrep.awk (revision 02d09e03eb27f3a2dc299de704e45dae5173f43f)
1*02d09e03SGordon Ross#
2*02d09e03SGordon Ross# CDDL HEADER START
3*02d09e03SGordon Ross#
4*02d09e03SGordon Ross# The contents of this file are subject to the terms of the
5*02d09e03SGordon Ross# Common Development and Distribution License (the "License").
6*02d09e03SGordon Ross# You may not use this file except in compliance with the License.
7*02d09e03SGordon Ross#
8*02d09e03SGordon Ross# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*02d09e03SGordon Ross# or http://www.opensolaris.org/os/licensing.
10*02d09e03SGordon Ross# See the License for the specific language governing permissions
11*02d09e03SGordon Ross# and limitations under the License.
12*02d09e03SGordon Ross#
13*02d09e03SGordon Ross# When distributing Covered Code, include this CDDL HEADER in each
14*02d09e03SGordon Ross# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*02d09e03SGordon Ross# If applicable, add the following below this CDDL HEADER, with the
16*02d09e03SGordon Ross# fields enclosed by brackets "[]" replaced with your own identifying
17*02d09e03SGordon Ross# information: Portions Copyright [yyyy] [name of copyright owner]
18*02d09e03SGordon Ross#
19*02d09e03SGordon Ross# CDDL HEADER END
20*02d09e03SGordon Ross#
21*02d09e03SGordon Ross
22*02d09e03SGordon Ross#
23*02d09e03SGordon Ross# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24*02d09e03SGordon Ross# Use is subject to license terms.
25*02d09e03SGordon Ross#
26*02d09e03SGordon Ross
27*02d09e03SGordon Ross# This is a "lint tail" that removes all the
28*02d09e03SGordon Ross# uninteresting lines from our lint output.
29*02d09e03SGordon Ross# It's nawk because sed doesn't do (a|b).
30*02d09e03SGordon Ross# Also comments are easier here.
31*02d09e03SGordon Ross
32*02d09e03SGordon Ross# The mb_put/md_get functions are intentionally used both
33*02d09e03SGordon Ross# with and without return value checks.  Not a concern.
34*02d09e03SGordon Ross/: mb_put_.* .E_FUNC_RET_[A-Z]*_IGNOR/		{ next; }
35*02d09e03SGordon Ross/: md_get_.* .E_FUNC_RET_[A-Z]*_IGNOR/		{ next; }
36*02d09e03SGordon Ross
37*02d09e03SGordon Ross# The rc_get* functions clear the out arg even on failure,
38*02d09e03SGordon Ross# so most callers don't need to check the return value.
39*02d09e03SGordon Ross/: rc_get[a-z]* .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
40*02d09e03SGordon Ross
41*02d09e03SGordon Ross# These have uninteresting return values, usually ignored.
42*02d09e03SGordon Ross/: (n|sm)b_ctx_readrcsection .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
43*02d09e03SGordon Ross/: nls_str_(lower|upper) .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
44*02d09e03SGordon Ross/: rc_(close|freesect) .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
45*02d09e03SGordon Ross
46*02d09e03SGordon Ross# Other functions for which we often ignore return values.
47*02d09e03SGordon Ross/: [a-z]*close .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
48*02d09e03SGordon Ross/: [a-z]*flush .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
49*02d09e03SGordon Ross/: [a-z]*printf .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
50*02d09e03SGordon Ross/: mem(cpy|move|set) .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
51*02d09e03SGordon Ross/: mutex_.* .E_FUNC_RET_[A-Z]*_IGNOR/		{ next; }
52*02d09e03SGordon Ross/: str[ln]?(cat|cpy) .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
53*02d09e03SGordon Ross
54*02d09e03SGordon Ross{ print; }
55