]>
git.saurik.com Git - apple/xnu.git/blob - bsd/miscfs/devfs/devfs.h
2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
26 * Copyright 1997,1998 Julian Elischer. All rights reserved.
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions are
32 * 1. Redistributions of source code must retain the above copyright
33 * notice, this list of conditions and the following disclaimer.
34 * 2. Redistributions in binary form must reproduce the above copyright notice,
35 * this list of conditions and the following disclaimer in the documentation
36 * and/or other materials provided with the distribution.
38 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS
39 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
40 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
41 * DISCLAIMED. IN NO EVENT SHALL THE HOLDER OR CONTRIBUTORS BE LIABLE FOR
42 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
43 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
44 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
45 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
46 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
47 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50 * miscfs/devfs/devfs.h
53 #ifndef _MISCFS_DEVFS_DEVFS_H_
54 #define _MISCFS_DEVFS_DEVFS_H_
56 #include <sys/appleapiopts.h>
58 #ifdef __APPLE_API_UNSTABLE
65 * Function: devfs_make_node
68 * Create a device node with the given pathname in the devfs namespace.
71 * dev - the dev_t value to associate
72 * chrblk - block or character device (DEVFS_CHAR or DEVFS_BLOCK)
73 * uid, gid - ownership
75 * fmt, ... - print format string and args to format the path name
77 * A handle to a device node if successful, NULL otherwise.
79 void * devfs_make_node
__P((dev_t dev
, int chrblk
, uid_t uid
, gid_t gid
,
80 int perms
, char *fmt
, ...));
83 * Function: devfs_make_link
86 * Create a link to a previously created device node.
89 * 0 if successful, -1 if failed
91 int devfs_link
__P((void * handle
, char *fmt
, ...));
94 * Function: devfs_remove
97 * Remove the device node returned by devfs_make_node() along with
98 * any links created with devfs_make_link().
100 void devfs_remove
__P((void * handle
));
103 #endif /* __APPLE_API_UNSTABLE */
105 #ifdef __APPLE_API_PRIVATE
114 #define GID_OPERATOR 5
117 #define GID_DIALER 68
118 #endif /* __APPLE_API_PRIVATE */
120 #endif /* !_MISCFS_DEVFS_DEVFS_H_ */