1*2c2f96dcSApple OSS Distributions /*
2*2c2f96dcSApple OSS Distributions * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
3*2c2f96dcSApple OSS Distributions *
4*2c2f96dcSApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5*2c2f96dcSApple OSS Distributions *
6*2c2f96dcSApple OSS Distributions * This file contains Original Code and/or Modifications of Original Code
7*2c2f96dcSApple OSS Distributions * as defined in and that are subject to the Apple Public Source License
8*2c2f96dcSApple OSS Distributions * Version 2.0 (the 'License'). You may not use this file except in
9*2c2f96dcSApple OSS Distributions * compliance with the License. The rights granted to you under the License
10*2c2f96dcSApple OSS Distributions * may not be used to create, or enable the creation or redistribution of,
11*2c2f96dcSApple OSS Distributions * unlawful or unlicensed copies of an Apple operating system, or to
12*2c2f96dcSApple OSS Distributions * circumvent, violate, or enable the circumvention or violation of, any
13*2c2f96dcSApple OSS Distributions * terms of an Apple operating system software license agreement.
14*2c2f96dcSApple OSS Distributions *
15*2c2f96dcSApple OSS Distributions * Please obtain a copy of the License at
16*2c2f96dcSApple OSS Distributions * http://www.opensource.apple.com/apsl/ and read it before using this file.
17*2c2f96dcSApple OSS Distributions *
18*2c2f96dcSApple OSS Distributions * The Original Code and all software distributed under the License are
19*2c2f96dcSApple OSS Distributions * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20*2c2f96dcSApple OSS Distributions * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21*2c2f96dcSApple OSS Distributions * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22*2c2f96dcSApple OSS Distributions * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23*2c2f96dcSApple OSS Distributions * Please see the License for the specific language governing rights and
24*2c2f96dcSApple OSS Distributions * limitations under the License.
25*2c2f96dcSApple OSS Distributions *
26*2c2f96dcSApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27*2c2f96dcSApple OSS Distributions */
28*2c2f96dcSApple OSS Distributions /*
29*2c2f96dcSApple OSS Distributions * Copyright 1997,1998 Julian Elischer. All rights reserved.
30*2c2f96dcSApple OSS Distributions * [email protected]
31*2c2f96dcSApple OSS Distributions *
32*2c2f96dcSApple OSS Distributions * Redistribution and use in source and binary forms, with or without
33*2c2f96dcSApple OSS Distributions * modification, are permitted provided that the following conditions are
34*2c2f96dcSApple OSS Distributions * met:
35*2c2f96dcSApple OSS Distributions * 1. Redistributions of source code must retain the above copyright
36*2c2f96dcSApple OSS Distributions * notice, this list of conditions and the following disclaimer.
37*2c2f96dcSApple OSS Distributions * 2. Redistributions in binary form must reproduce the above copyright notice,
38*2c2f96dcSApple OSS Distributions * this list of conditions and the following disclaimer in the documentation
39*2c2f96dcSApple OSS Distributions * and/or other materials provided with the distribution.
40*2c2f96dcSApple OSS Distributions *
41*2c2f96dcSApple OSS Distributions * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS
42*2c2f96dcSApple OSS Distributions * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
43*2c2f96dcSApple OSS Distributions * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
44*2c2f96dcSApple OSS Distributions * DISCLAIMED. IN NO EVENT SHALL THE HOLDER OR CONTRIBUTORS BE LIABLE FOR
45*2c2f96dcSApple OSS Distributions * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46*2c2f96dcSApple OSS Distributions * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
47*2c2f96dcSApple OSS Distributions * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
48*2c2f96dcSApple OSS Distributions * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49*2c2f96dcSApple OSS Distributions * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50*2c2f96dcSApple OSS Distributions * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51*2c2f96dcSApple OSS Distributions * SUCH DAMAGE.
52*2c2f96dcSApple OSS Distributions *
53*2c2f96dcSApple OSS Distributions * devfsdefs.h
54*2c2f96dcSApple OSS Distributions */
55*2c2f96dcSApple OSS Distributions /*
56*2c2f96dcSApple OSS Distributions * NOTICE: This file was modified by McAfee Research in 2004 to introduce
57*2c2f96dcSApple OSS Distributions * support for mandatory and extensible security protections. This notice
58*2c2f96dcSApple OSS Distributions * is included in support of clause 2.2 (b) of the Apple Public License,
59*2c2f96dcSApple OSS Distributions * Version 2.0.
60*2c2f96dcSApple OSS Distributions */
61*2c2f96dcSApple OSS Distributions
62*2c2f96dcSApple OSS Distributions /*
63*2c2f96dcSApple OSS Distributions * HISTORY
64*2c2f96dcSApple OSS Distributions * 8-April-1999 Dieter Siegmund ([email protected])
65*2c2f96dcSApple OSS Distributions * Ported to from FreeBSD 3.1
66*2c2f96dcSApple OSS Distributions * Removed unnecessary/unused defines
67*2c2f96dcSApple OSS Distributions * Renamed structures/elements to clarify usage in code.
68*2c2f96dcSApple OSS Distributions */
69*2c2f96dcSApple OSS Distributions
70*2c2f96dcSApple OSS Distributions #ifndef __DEVFS_DEVFSDEFS_H__
71*2c2f96dcSApple OSS Distributions #define __DEVFS_DEVFSDEFS_H__
72*2c2f96dcSApple OSS Distributions
73*2c2f96dcSApple OSS Distributions #include <sys/appleapiopts.h>
74*2c2f96dcSApple OSS Distributions
75*2c2f96dcSApple OSS Distributions __BEGIN_DECLS
76*2c2f96dcSApple OSS Distributions #ifdef __APPLE_API_PRIVATE
77*2c2f96dcSApple OSS Distributions #define DEVMAXNAMESIZE 32 /* XXX */
78*2c2f96dcSApple OSS Distributions #define DEVMAXPATHSIZE 128 /* XXX */
79*2c2f96dcSApple OSS Distributions
80*2c2f96dcSApple OSS Distributions typedef enum {
81*2c2f96dcSApple OSS Distributions DEV_DIR,
82*2c2f96dcSApple OSS Distributions DEV_BDEV,
83*2c2f96dcSApple OSS Distributions DEV_CDEV,
84*2c2f96dcSApple OSS Distributions DEV_SLNK,
85*2c2f96dcSApple OSS Distributions #if FDESC
86*2c2f96dcSApple OSS Distributions DEV_DEVFD
87*2c2f96dcSApple OSS Distributions #endif /* FDESC */
88*2c2f96dcSApple OSS Distributions } devfstype_t;
89*2c2f96dcSApple OSS Distributions
90*2c2f96dcSApple OSS Distributions extern int(**devfs_vnodeop_p)(void *); /* our own vector array for dirs */
91*2c2f96dcSApple OSS Distributions extern int(**devfs_spec_vnodeop_p)(void *); /* our own vector array for devs */
92*2c2f96dcSApple OSS Distributions extern const struct vfsops devfs_vfsops;
93*2c2f96dcSApple OSS Distributions
94*2c2f96dcSApple OSS Distributions typedef struct devnode devnode_t;
95*2c2f96dcSApple OSS Distributions typedef struct devdirent devdirent_t;
96*2c2f96dcSApple OSS Distributions typedef union devnode_type devnode_type_t;
97*2c2f96dcSApple OSS Distributions
98*2c2f96dcSApple OSS Distributions struct devfs_stats {
99*2c2f96dcSApple OSS Distributions int nodes;
100*2c2f96dcSApple OSS Distributions int entries;
101*2c2f96dcSApple OSS Distributions int mounts;
102*2c2f96dcSApple OSS Distributions int stringspace;
103*2c2f96dcSApple OSS Distributions };
104*2c2f96dcSApple OSS Distributions
105*2c2f96dcSApple OSS Distributions union devnode_type {
106*2c2f96dcSApple OSS Distributions dev_t dev;
107*2c2f96dcSApple OSS Distributions struct {
108*2c2f96dcSApple OSS Distributions devdirent_t * dirlist;
109*2c2f96dcSApple OSS Distributions devdirent_t * * dirlast;
110*2c2f96dcSApple OSS Distributions devnode_t * parent;
111*2c2f96dcSApple OSS Distributions devdirent_t * myname; /* my entry in .. */
112*2c2f96dcSApple OSS Distributions int entrycount;
113*2c2f96dcSApple OSS Distributions }Dir;
114*2c2f96dcSApple OSS Distributions struct {
115*2c2f96dcSApple OSS Distributions char * name;/* must be allocated separately */
116*2c2f96dcSApple OSS Distributions size_t namelen;
117*2c2f96dcSApple OSS Distributions }Slnk;
118*2c2f96dcSApple OSS Distributions };
119*2c2f96dcSApple OSS Distributions
120*2c2f96dcSApple OSS Distributions #define DEV_MAX_VNODE_RETRY 8 /* Max number of retries when we try to
121*2c2f96dcSApple OSS Distributions * get a vnode for the devnode */
122*2c2f96dcSApple OSS Distributions struct devnode {
123*2c2f96dcSApple OSS Distributions devfstype_t dn_type;
124*2c2f96dcSApple OSS Distributions /*
125*2c2f96dcSApple OSS Distributions * Number of vnodes that point to this devnode. Note, we do not
126*2c2f96dcSApple OSS Distributions * add another reference for a lookup which finds an existing
127*2c2f96dcSApple OSS Distributions * vnode; a reference is added when a vnode is created and removed
128*2c2f96dcSApple OSS Distributions * when a vnode is reclaimed. A devnode will not be freed while
129*2c2f96dcSApple OSS Distributions * there are outstanding references. A refcount can be added to
130*2c2f96dcSApple OSS Distributions * prevent the free of a devnode in situations where there is not
131*2c2f96dcSApple OSS Distributions * guaranteed to be a vnode holding a ref, but it is important to
132*2c2f96dcSApple OSS Distributions * make sure that a deferred delete eventually happens if it is
133*2c2f96dcSApple OSS Distributions * blocked behind that reference.
134*2c2f96dcSApple OSS Distributions */
135*2c2f96dcSApple OSS Distributions os_ref_atomic_t dn_refcount;
136*2c2f96dcSApple OSS Distributions u_short dn_mode;
137*2c2f96dcSApple OSS Distributions uid_t dn_uid;
138*2c2f96dcSApple OSS Distributions gid_t dn_gid;
139*2c2f96dcSApple OSS Distributions struct timespec dn_atime;/* time of last access */
140*2c2f96dcSApple OSS Distributions struct timespec dn_mtime;/* time of last modification */
141*2c2f96dcSApple OSS Distributions struct timespec dn_ctime;/* time file changed */
142*2c2f96dcSApple OSS Distributions int(***dn_ops)(void *);/* yuk... pointer to pointer(s) to funcs */
143*2c2f96dcSApple OSS Distributions int dn_links;/* how many file links does this node have? */
144*2c2f96dcSApple OSS Distributions struct devfsmount * dn_dvm; /* the mount structure for this 'plane' */
145*2c2f96dcSApple OSS Distributions struct vnode * dn_vn;/* address of last vnode that represented us */
146*2c2f96dcSApple OSS Distributions int dn_len;/* of any associated info (e.g. dir data) */
147*2c2f96dcSApple OSS Distributions devdirent_t * dn_linklist;/* circular list of hardlinks to this node */
148*2c2f96dcSApple OSS Distributions devnode_t * dn_nextsibling;/* the list of equivalent nodes */
149*2c2f96dcSApple OSS Distributions devnode_t * * dn_prevsiblingp;/* backpointer for the above */
150*2c2f96dcSApple OSS Distributions devnode_type_t dn_typeinfo;
151*2c2f96dcSApple OSS Distributions int dn_change;
152*2c2f96dcSApple OSS Distributions int dn_update;
153*2c2f96dcSApple OSS Distributions int dn_access;
154*2c2f96dcSApple OSS Distributions int dn_lflags;
155*2c2f96dcSApple OSS Distributions ino_t dn_ino;
156*2c2f96dcSApple OSS Distributions int (*dn_clone)(dev_t dev, int action);/* get minor # */
157*2c2f96dcSApple OSS Distributions struct label * dn_label; /* security label */
158*2c2f96dcSApple OSS Distributions };
159*2c2f96dcSApple OSS Distributions
160*2c2f96dcSApple OSS Distributions #define DN_DELETE 0x02
161*2c2f96dcSApple OSS Distributions #define DN_CREATE 0x04
162*2c2f96dcSApple OSS Distributions #define DN_CREATEWAIT 0x08
163*2c2f96dcSApple OSS Distributions
164*2c2f96dcSApple OSS Distributions
165*2c2f96dcSApple OSS Distributions struct devdirent {
166*2c2f96dcSApple OSS Distributions /*-----------------------directory entry fields-------------*/
167*2c2f96dcSApple OSS Distributions char de_name[DEVMAXNAMESIZE];
168*2c2f96dcSApple OSS Distributions devnode_t * de_dnp; /* the "inode" (devnode) pointer */
169*2c2f96dcSApple OSS Distributions devnode_t * de_parent; /* backpointer to the directory itself */
170*2c2f96dcSApple OSS Distributions devdirent_t * de_next; /* next object in this directory */
171*2c2f96dcSApple OSS Distributions devdirent_t * *de_prevp; /* previous pointer in directory linked list */
172*2c2f96dcSApple OSS Distributions devdirent_t * de_nextlink;/* next hardlink to this node */
173*2c2f96dcSApple OSS Distributions devdirent_t * *de_prevlinkp;/* previous hardlink pointer for this node */
174*2c2f96dcSApple OSS Distributions };
175*2c2f96dcSApple OSS Distributions
176*2c2f96dcSApple OSS Distributions extern devdirent_t * dev_root;
177*2c2f96dcSApple OSS Distributions extern struct devfs_stats devfs_stats;
178*2c2f96dcSApple OSS Distributions extern lck_mtx_t devfs_mutex;
179*2c2f96dcSApple OSS Distributions extern lck_mtx_t devfs_attr_mutex;
180*2c2f96dcSApple OSS Distributions
181*2c2f96dcSApple OSS Distributions /*
182*2c2f96dcSApple OSS Distributions * Rules for front nodes:
183*2c2f96dcSApple OSS Distributions * Dirs hava a strict 1:1 relationship with their OWN devnode
184*2c2f96dcSApple OSS Distributions * Symlinks similarly
185*2c2f96dcSApple OSS Distributions * Device Nodes ALWAYS point to the devnode that is linked
186*2c2f96dcSApple OSS Distributions * to the Backing node. (with a ref count)
187*2c2f96dcSApple OSS Distributions */
188*2c2f96dcSApple OSS Distributions
189*2c2f96dcSApple OSS Distributions /*
190*2c2f96dcSApple OSS Distributions * DEVFS specific per/mount information, used to link a monted fs to a
191*2c2f96dcSApple OSS Distributions * particular 'plane' of front nodes.
192*2c2f96dcSApple OSS Distributions */
193*2c2f96dcSApple OSS Distributions struct devfsmount {
194*2c2f96dcSApple OSS Distributions struct mount * mount;/* vfs mount struct for this fs */
195*2c2f96dcSApple OSS Distributions devdirent_t * plane_root;/* the root of this 'plane' */
196*2c2f96dcSApple OSS Distributions };
197*2c2f96dcSApple OSS Distributions
198*2c2f96dcSApple OSS Distributions /*
199*2c2f96dcSApple OSS Distributions * Prototypes for DEVFS virtual filesystem operations
200*2c2f96dcSApple OSS Distributions */
201*2c2f96dcSApple OSS Distributions #include <sys/lock.h>
202*2c2f96dcSApple OSS Distributions #include <miscfs/devfs/devfs_proto.h>
203*2c2f96dcSApple OSS Distributions #include <libkern/OSAtomic.h> /* required for OSAddAtomic() */
204*2c2f96dcSApple OSS Distributions
205*2c2f96dcSApple OSS Distributions //#define HIDDEN_MOUNTPOINT 1
206*2c2f96dcSApple OSS Distributions
207*2c2f96dcSApple OSS Distributions /* misc */
208*2c2f96dcSApple OSS Distributions
209*2c2f96dcSApple OSS Distributions #define VTODN(vp) ((devnode_t *)(vp)->v_data)
210*2c2f96dcSApple OSS Distributions
211*2c2f96dcSApple OSS Distributions #define DEVFS_LOCK() lck_mtx_lock(&devfs_mutex)
212*2c2f96dcSApple OSS Distributions #define DEVFS_UNLOCK() lck_mtx_unlock(&devfs_mutex)
213*2c2f96dcSApple OSS Distributions
214*2c2f96dcSApple OSS Distributions #define DEVFS_ATTR_LOCK_SPIN() lck_mtx_lock_spin(&devfs_attr_mutex);
215*2c2f96dcSApple OSS Distributions #define DEVFS_ATTR_UNLOCK() lck_mtx_unlock(&devfs_attr_mutex);
216*2c2f96dcSApple OSS Distributions
217*2c2f96dcSApple OSS Distributions /*
218*2c2f96dcSApple OSS Distributions * XXX all the (SInt32 *) casts below assume sizeof(int) == sizeof(long)
219*2c2f96dcSApple OSS Distributions */
220*2c2f96dcSApple OSS Distributions static __inline__ void
DEVFS_INCR_ENTRIES(void)221*2c2f96dcSApple OSS Distributions DEVFS_INCR_ENTRIES(void)
222*2c2f96dcSApple OSS Distributions {
223*2c2f96dcSApple OSS Distributions OSAddAtomic(1, &devfs_stats.entries);
224*2c2f96dcSApple OSS Distributions }
225*2c2f96dcSApple OSS Distributions
226*2c2f96dcSApple OSS Distributions static __inline__ void
DEVFS_DECR_ENTRIES(void)227*2c2f96dcSApple OSS Distributions DEVFS_DECR_ENTRIES(void)
228*2c2f96dcSApple OSS Distributions {
229*2c2f96dcSApple OSS Distributions OSAddAtomic(-1, &devfs_stats.entries);
230*2c2f96dcSApple OSS Distributions }
231*2c2f96dcSApple OSS Distributions
232*2c2f96dcSApple OSS Distributions static __inline__ void
DEVFS_INCR_NODES(void)233*2c2f96dcSApple OSS Distributions DEVFS_INCR_NODES(void)
234*2c2f96dcSApple OSS Distributions {
235*2c2f96dcSApple OSS Distributions OSAddAtomic(1, &devfs_stats.nodes);
236*2c2f96dcSApple OSS Distributions }
237*2c2f96dcSApple OSS Distributions
238*2c2f96dcSApple OSS Distributions static __inline__ void
DEVFS_DECR_NODES(void)239*2c2f96dcSApple OSS Distributions DEVFS_DECR_NODES(void)
240*2c2f96dcSApple OSS Distributions {
241*2c2f96dcSApple OSS Distributions OSAddAtomic(-1, &devfs_stats.nodes);
242*2c2f96dcSApple OSS Distributions }
243*2c2f96dcSApple OSS Distributions
244*2c2f96dcSApple OSS Distributions static __inline__ void
DEVFS_INCR_MOUNTS(void)245*2c2f96dcSApple OSS Distributions DEVFS_INCR_MOUNTS(void)
246*2c2f96dcSApple OSS Distributions {
247*2c2f96dcSApple OSS Distributions OSAddAtomic(1, &devfs_stats.mounts);
248*2c2f96dcSApple OSS Distributions }
249*2c2f96dcSApple OSS Distributions
250*2c2f96dcSApple OSS Distributions static __inline__ void
DEVFS_DECR_MOUNTS(void)251*2c2f96dcSApple OSS Distributions DEVFS_DECR_MOUNTS(void)
252*2c2f96dcSApple OSS Distributions {
253*2c2f96dcSApple OSS Distributions OSAddAtomic(-1, &devfs_stats.mounts);
254*2c2f96dcSApple OSS Distributions }
255*2c2f96dcSApple OSS Distributions
256*2c2f96dcSApple OSS Distributions static __inline__ void
DEVFS_INCR_STRINGSPACE(int space)257*2c2f96dcSApple OSS Distributions DEVFS_INCR_STRINGSPACE(int space)
258*2c2f96dcSApple OSS Distributions {
259*2c2f96dcSApple OSS Distributions OSAddAtomic(space, &devfs_stats.stringspace);
260*2c2f96dcSApple OSS Distributions }
261*2c2f96dcSApple OSS Distributions
262*2c2f96dcSApple OSS Distributions static __inline__ void
DEVFS_DECR_STRINGSPACE(int space)263*2c2f96dcSApple OSS Distributions DEVFS_DECR_STRINGSPACE(int space)
264*2c2f96dcSApple OSS Distributions {
265*2c2f96dcSApple OSS Distributions OSAddAtomic(-space, &devfs_stats.stringspace);
266*2c2f96dcSApple OSS Distributions }
267*2c2f96dcSApple OSS Distributions
268*2c2f96dcSApple OSS Distributions /*
269*2c2f96dcSApple OSS Distributions * Access, change, and modify times are protected by a separate lock,
270*2c2f96dcSApple OSS Distributions * which allows tty times to be updated (no more than once per second)
271*2c2f96dcSApple OSS Distributions * in the I/O path without too much fear of contention.
272*2c2f96dcSApple OSS Distributions *
273*2c2f96dcSApple OSS Distributions * For getattr, update times to current time if the last update was recent;
274*2c2f96dcSApple OSS Distributions * preserve legacy behavior that frequent stats can yield sub-second resolutions.
275*2c2f96dcSApple OSS Distributions * If the last time is old, however, we know that the event that triggered
276*2c2f96dcSApple OSS Distributions * the need for an update was no more than 1s after the last update. In that case,
277*2c2f96dcSApple OSS Distributions * use (last update + 1s) as the time, avoiding the illusion that last update happened
278*2c2f96dcSApple OSS Distributions * much later than it really did.
279*2c2f96dcSApple OSS Distributions */
280*2c2f96dcSApple OSS Distributions #define DEVFS_LAZY_UPDATE_SECONDS 1
281*2c2f96dcSApple OSS Distributions
282*2c2f96dcSApple OSS Distributions #define DEVFS_UPDATE_CHANGE 0x1
283*2c2f96dcSApple OSS Distributions #define DEVFS_UPDATE_MOD 0x2
284*2c2f96dcSApple OSS Distributions #define DEVFS_UPDATE_ACCESS 0x4
285*2c2f96dcSApple OSS Distributions
286*2c2f96dcSApple OSS Distributions static __inline__ void
dn_copy_times(devnode_t * target,devnode_t * source)287*2c2f96dcSApple OSS Distributions dn_copy_times(devnode_t * target, devnode_t * source)
288*2c2f96dcSApple OSS Distributions {
289*2c2f96dcSApple OSS Distributions DEVFS_ATTR_LOCK_SPIN();
290*2c2f96dcSApple OSS Distributions target->dn_atime = source->dn_atime;
291*2c2f96dcSApple OSS Distributions target->dn_mtime = source->dn_mtime;
292*2c2f96dcSApple OSS Distributions target->dn_ctime = source->dn_ctime;
293*2c2f96dcSApple OSS Distributions DEVFS_ATTR_UNLOCK();
294*2c2f96dcSApple OSS Distributions return;
295*2c2f96dcSApple OSS Distributions }
296*2c2f96dcSApple OSS Distributions
297*2c2f96dcSApple OSS Distributions #ifdef BSD_KERNEL_PRIVATE
298*2c2f96dcSApple OSS Distributions int devfs_make_symlink(devnode_t *dir_p, char *name, mode_t mode, char *target, devdirent_t **newent);
299*2c2f96dcSApple OSS Distributions #endif /* BSD_KERNEL_PRIVATE */
300*2c2f96dcSApple OSS Distributions
301*2c2f96dcSApple OSS Distributions #endif /* __APPLE_API_PRIVATE */
302*2c2f96dcSApple OSS Distributions
303*2c2f96dcSApple OSS Distributions __END_DECLS
304*2c2f96dcSApple OSS Distributions
305*2c2f96dcSApple OSS Distributions #endif /* __DEVFS_DEVFSDEFS_H__ */
306