Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/fs/cachefs_dir.h
+++ new/usr/src/uts/common/sys/fs/cachefs_dir.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
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 22 /*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 + *
23 25 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 26 * Use is subject to license terms.
25 27 */
26 28
27 29 #ifndef _SYS_FS_CACHEFS_DIR_H
28 30 #define _SYS_FS_CACHEFS_DIR_H
29 31
30 -#pragma ident "%Z%%M% %I% %E% SMI"
31 -
32 32 #include <sys/types.h>
33 33 #include <sys/fs/cachefs_fs.h>
34 34
35 35 #ifdef __cplusplus
36 36 extern "C" {
37 37 #endif
38 38
39 39 /*
40 40 * c_dirent is stored on disk, so it needs to be the same 32-bit vs. 64-bit.
41 41 */
42 42
43 43 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
44 44 #pragma pack(4)
45 45 #endif
46 46
47 47 struct c_dirent {
48 48 uint_t d_length; /* entry length */
49 49 uint_t d_flag; /* entry flags */
50 50 cfs_cid_t d_id; /* file id */
51 51 offset_t d_offset; /* disk offset of this entry */
52 52 cfs_fid_t d_cookie; /* back fid */
53 53 ushort_t d_namelen; /* name length, without null */
54 54 char d_name[1]; /* name */
55 55 };
56 56
57 57 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
58 58 #pragma pack()
59 59 #endif
60 60
61 61 #define C_DIRSIZ(dp) \
62 62 (((dp)->d_namelen + (uint_t)sizeof (struct c_dirent) + 7) & ~7)
63 63
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
64 64 #define CDE_SIZE(NM) \
65 65 ((strlen(NM) + sizeof (struct c_dirent) + 7) & ~7)
66 66
67 67 /*
68 68 * Various flags stored in c_dirent flag field.
69 69 */
70 70 #define CDE_VALID 0x1 /* entry is valid */
71 71 #define CDE_COMPLETE 0x2 /* entry is complete */
72 72
73 73
74 -#if defined(_KERNEL) && defined(__STDC__)
74 +#if defined(_KERNEL)
75 75 int cachefs_dir_look(cnode_t *dcp, char *nm, fid_t *cookiep, uint_t *flagp,
76 76 u_offset_t *d_offsetp, cfs_cid_t *cidp);
77 77 int cachefs_dir_new(cnode_t *dcp, cnode_t *cp);
78 78 int cachefs_dir_enter(cnode_t *dcp, char *nm, fid_t *cookiep, cfs_cid_t *cidp,
79 79 int issync);
80 80 int cachefs_dir_rmentry(cnode_t *dcp, char *nm);
81 81 void cachefs_dir_modentry(cnode_t *dcp, u_offset_t offset, fid_t *cookiep,
82 82 cfs_cid_t *cidp);
83 83 int cachefs_dir_read(struct cnode *dcp, struct uio *uiop, int *eofp);
84 84 int cachefs_dir_fill(cnode_t *dcp, cred_t *cr);
85 85 int cachefs_dir_empty(cnode_t *dcp);
86 86 int cachefs_async_populate_dir(struct cachefs_populate_req *, cred_t *,
87 87 vnode_t *, vnode_t *);
88 88
89 -#endif /* defined(_KERNEL) && defined(__STDC__) */
89 +#endif /* defined(_KERNEL) */
90 90
91 91 #ifdef __cplusplus
92 92 }
93 93 #endif
94 94
95 95 #endif /* _SYS_FS_CACHEFS_DIR_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX