8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / bart / lutbl.c
blob1e82926f754460961641145d3b16ac6843480824
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
26 #pragma ident "%Z%%M% %I% %E% SMI"
28 #include <dirent.h>
29 #include <fnmatch.h>
30 #include "bart.h"
33 struct cmd_keyword {
34 char *ck_name;
35 void (*ck_func)(void);
38 static struct attr_keyword attr_keywords[] = {
39 { ALL_KEYWORD, ~0 },
40 { CONTENTS_KEYWORD, ATTR_CONTENTS },
41 { TYPE_KEYWORD, ATTR_TYPE },
42 { SIZE_KEYWORD, ATTR_SIZE },
43 { MODE_KEYWORD, ATTR_MODE },
44 { ACL_KEYWORD, ATTR_ACL },
45 { UID_KEYWORD, ATTR_UID },
46 { GID_KEYWORD, ATTR_GID },
47 { MTIME_KEYWORD, ATTR_MTIME },
48 { LNMTIME_KEYWORD, ATTR_LNMTIME },
49 { DIRMTIME_KEYWORD, ATTR_DIRMTIME },
50 { DEST_KEYWORD, ATTR_DEST },
51 { DEVNODE_KEYWORD, ATTR_DEVNODE },
52 { ADD_KEYWORD, ATTR_ADD },
53 { DELETE_KEYWORD, ATTR_DELETE },
54 { NULL }
57 struct attr_keyword *
58 attr_keylookup(char *word)
60 struct attr_keyword *akp;
62 for (akp = attr_keywords; ; akp++) {
63 if (akp->ak_name == NULL)
64 break;
65 if (strcasecmp(word, akp->ak_name) == 0)
66 return (akp);
68 return (NULL);