Annotation of XNU/bsd/miscfs/devfs/devfs.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
        !             3:  *
        !             4:  * @APPLE_LICENSE_HEADER_START@
        !             5:  * 
        !             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.
        !            11:  * 
        !            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
        !            18:  * under the License.
        !            19:  * 
        !            20:  * @APPLE_LICENSE_HEADER_END@
        !            21:  */
        !            22: /*
        !            23:  * Copyright 1997,1998 Julian Elischer.  All rights reserved.
        !            24:  * [email protected]
        !            25:  * 
        !            26:  * Redistribution and use in source and binary forms, with or without
        !            27:  * modification, are permitted provided that the following conditions are
        !            28:  * met:
        !            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.
        !            34:  * 
        !            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
        !            45:  * SUCH DAMAGE.
        !            46:  * 
        !            47:  * miscfs/devfs/devfs.h
        !            48:  */
        !            49: 
        !            50: #ifndef _MISCFS_DEVFS_DEVFS_H_
        !            51: #define        _MISCFS_DEVFS_DEVFS_H_
        !            52: 
        !            53: #define DEVFS_CHAR     0
        !            54: #define DEVFS_BLOCK    1
        !            55: 
        !            56: __BEGIN_DECLS
        !            57: 
        !            58: /*
        !            59:  * Function: devfs_make_node
        !            60:  *
        !            61:  * Purpose
        !            62:  *   Create a device node with the given pathname in the devfs namespace.
        !            63:  *
        !            64:  * Parameters:
        !            65:  *   dev       - the dev_t value to associate
        !            66:  *   chrblk    - block or character device (DEVFS_CHAR or DEVFS_BLOCK)
        !            67:  *   uid, gid  - ownership
        !            68:  *   perms     - permissions
        !            69:  *   fmt, ...  - print format string and args to format the path name
        !            70:  * Returns:
        !            71:  *   A handle to a device node if successful, NULL otherwise.
        !            72:  */
        !            73: void *         devfs_make_node __P((dev_t dev, int chrblk, uid_t uid, gid_t gid, 
        !            74:                             int perms, char *fmt, ...));
        !            75: 
        !            76: /*
        !            77:  * Function: devfs_make_link
        !            78:  *
        !            79:  * Purpose:
        !            80:  *   Create a link to a previously created device node.
        !            81:  *
        !            82:  * Returns:
        !            83:  *   0 if successful, -1 if failed
        !            84:  */
        !            85: int    devfs_link __P((void * handle, char *fmt, ...));
        !            86: 
        !            87: /*
        !            88:  * Function: devfs_remove
        !            89:  *
        !            90:  * Purpose:
        !            91:  *   Remove the device node returned by devfs_make_node() along with
        !            92:  *   any links created with devfs_make_link().
        !            93:  */
        !            94: void   devfs_remove __P((void * handle));
        !            95: 
        !            96: __END_DECLS
        !            97: 
        !            98: /* XXX */
        !            99: #define        UID_ROOT        0
        !           100: #define        UID_BIN         3
        !           101: #define        UID_UUCP        66
        !           102: 
        !           103: /* XXX */
        !           104: #define        GID_WHEEL       0
        !           105: #define        GID_KMEM        2
        !           106: #define        GID_OPERATOR    5
        !           107: #define        GID_BIN         7
        !           108: #define        GID_GAMES       13
        !           109: #define        GID_DIALER      68
        !           110: 
        !           111: #endif /* !_MISCFS_DEVFS_DEVFS_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.