]>
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  * 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_ 
  53 #include <sys/appleapiopts.h> 
  55 #ifdef __APPLE_API_UNSTABLE 
  62  * Function: devfs_make_node 
  65  *   Create a device node with the given pathname in the devfs namespace. 
  68  *   dev        - the dev_t value to associate 
  69  *   chrblk     - block or character device (DEVFS_CHAR or DEVFS_BLOCK) 
  70  *   uid, gid   - ownership 
  72  *   fmt, ...   - print format string and args to format the path name 
  74  *   A handle to a device node if successful, NULL otherwise. 
  76 void *  devfs_make_node 
__P((dev_t dev
, int chrblk
, uid_t uid
, gid_t gid
,  
  77                              int perms
, char *fmt
, ...)); 
  80  * Function: devfs_make_link 
  83  *   Create a link to a previously created device node. 
  86  *   0 if successful, -1 if failed 
  88 int     devfs_link 
__P((void * handle
, char *fmt
, ...)); 
  91  * Function: devfs_remove 
  94  *   Remove the device node returned by devfs_make_node() along with 
  95  *   any links created with devfs_make_link(). 
  97 void    devfs_remove 
__P((void * handle
)); 
 100 #endif /* __APPLE_API_UNSTABLE */ 
 102 #ifdef __APPLE_API_PRIVATE 
 111 #define GID_OPERATOR    5 
 114 #define GID_DIALER      68 
 115 #endif /* __APPLE_API_PRIVATE */ 
 117 #endif /* !_MISCFS_DEVFS_DEVFS_H_ */