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