[BACK]Return to filesys.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / rdistd

Annotation of src/usr.bin/rdistd/filesys.h, Revision 1.1

1.1     ! dm          1: /*
        !             2:  * Copyright (c) 1983 Regents of the University of California.
        !             3:  * All rights reserved.
        !             4:  *
        !             5:  * Redistribution and use in source and binary forms, with or without
        !             6:  * modification, are permitted provided that the following conditions
        !             7:  * are met:
        !             8:  * 1. Redistributions of source code must retain the above copyright
        !             9:  *    notice, this list of conditions and the following disclaimer.
        !            10:  * 2. Redistributions in binary form must reproduce the above copyright
        !            11:  *    notice, this list of conditions and the following disclaimer in the
        !            12:  *    documentation and/or other materials provided with the distribution.
        !            13:  * 3. All advertising materials mentioning features or use of this software
        !            14:  *    must display the following acknowledgement:
        !            15:  *     This product includes software developed by the University of
        !            16:  *     California, Berkeley and its contributors.
        !            17:  * 4. Neither the name of the University nor the names of its contributors
        !            18:  *    may be used to endorse or promote products derived from this software
        !            19:  *    without specific prior written permission.
        !            20:  *
        !            21:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
        !            22:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        !            23:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        !            24:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
        !            25:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        !            26:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
        !            27:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        !            28:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            29:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            30:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            31:  * SUCH DAMAGE.
        !            32:  */
        !            33:
        !            34: /*
        !            35:  * $Id: filesys.h,v 6.19 1995/12/12 00:46:46 mcooper Exp $
        !            36:  * @(#)filesys.h
        !            37:  */
        !            38:
        !            39: #ifndef __filesys_h__
        !            40: #define __filesys_h__
        !            41:
        !            42: /*
        !            43:  * File System information
        !            44:  */
        !            45:
        !            46: /*
        !            47:  * Mount information
        !            48:  */
        !            49: #if FSI_TYPE == FSI_GETMNT
        !            50: #      include <sys/types.h>
        !            51: #      include <sys/param.h>
        !            52: #      include <sys/mount.h>
        !            53: #      define MOUNTED_FILE             "<none>"
        !            54: #endif
        !            55:
        !            56: #if FSI_TYPE == FSI_GETFSSTAT
        !            57: #      include <sys/types.h>
        !            58: #      include <sys/mount.h>
        !            59: #      define MOUNTED_FILE             "<none>"
        !            60: #endif
        !            61:
        !            62: #if FSI_TYPE == FSI_MNTCTL
        !            63: #      include <sys/mntctl.h>
        !            64: #      define MOUNTED_FILE             "<none>"
        !            65: #endif
        !            66:
        !            67: #if FSI_TYPE == FSI_GETMNTENT
        !            68: #      include <mntent.h>
        !            69: #      define  MOUNTED_FILE            MOUNTED
        !            70: #endif
        !            71:
        !            72: #if FSI_TYPE == FSI_GETMNTENT2
        !            73: #if     defined(MNTTAB_H)
        !            74: #       include MNTTAB_H
        !            75: #endif /* MNTTAB_H */
        !            76: #if     defined(MNTENT_H)
        !            77: #       include MNTENT_H
        !            78: #endif /* MNTENT_H */
        !            79: #      define  MOUNTED_FILE            MNTTAB
        !            80: #endif /* FSI_GETMNTENT2 */
        !            81:
        !            82: #if    !defined(MOUNTED_FILE) && defined(MNT_MNTTAB)   /* HPUX */
        !            83: #      define MOUNTED_FILE             MNT_MNTTAB
        !            84: #endif /* MNT_MNTTAB */
        !            85:
        !            86: /*
        !            87:  * NCR OS defines bcopy and bzero
        !            88:  */
        !            89: #if defined(NCR)
        !            90: #undef bcopy
        !            91: #undef bzero
        !            92: #endif /* NCR */
        !            93:
        !            94: /*
        !            95:  * Stat Filesystem
        !            96:  */
        !            97: #if    defined(STATFS_TYPE)
        !            98: #if defined(ultrix)
        !            99:        typedef struct fs_data          statfs_t;
        !           100: #      define f_bavail                 fd_req.bfreen
        !           101: #      define f_bsize                  fd_req.bsize
        !           102: #      define f_ffree                  fd_req.gfree
        !           103: #else
        !           104: #if defined(_AIX) || STATFS_TYPE == STATFS_SYSV
        !           105: #      include <sys/statfs.h>
        !           106:        typedef struct statfs           statfs_t;
        !           107: #      define f_bavail                 f_bfree
        !           108: #else
        !           109: #if defined(SVR4)
        !           110: #      include <sys/statvfs.h>
        !           111:        typedef struct statvfs          statfs_t;
        !           112: #      define statfs(mp,sb)            statvfs(mp,sb)
        !           113: #else
        !           114: #if defined(BSD386) || defined(__bsdi__) || defined(FREEBSD) || STATFS_TYPE == STATFS_OSF1
        !           115:        typedef struct statfs           statfs_t;
        !           116: #else
        !           117: #      include <sys/vfs.h>
        !           118:        typedef struct statfs           statfs_t;
        !           119: #endif /* BSD386 */
        !           120: #endif /* SVR4 */
        !           121: #endif /* _AIX */
        !           122: #endif /* ultrix */
        !           123: #endif /* STATFS_TYPE */
        !           124:
        !           125: /*
        !           126:  * Mount Entry definetions
        !           127:  */
        !           128: #ifndef METYPE_OTHER
        !           129: #define METYPE_OTHER                   "other"
        !           130: #endif
        !           131: #ifndef METYPE_NFS
        !           132: #define METYPE_NFS                     "nfs"
        !           133: #endif
        !           134: #ifndef MEFLAG_READONLY
        !           135: #define MEFLAG_READONLY                        0x01
        !           136: #endif
        !           137: #ifndef MEFLAG_IGNORE
        !           138: #define MEFLAG_IGNORE                  0x02
        !           139: #endif
        !           140:
        !           141: /*
        !           142:  * Our internal mount entry type
        !           143:  */
        !           144: struct _mntent {
        !           145:        char                           *me_path;        /* Mounted path */
        !           146:        char                           *me_type;        /* Type of mount */
        !           147:        int                             me_flags;       /* Mount flags */
        !           148: };
        !           149: typedef struct _mntent mntent_t;
        !           150:
        !           151: /*
        !           152:  * Internal mount information type
        !           153:  */
        !           154: struct mntinfo {
        !           155:        mntent_t                        *mi_mnt;
        !           156:        struct stat                     *mi_statb;
        !           157:        struct mntinfo                  *mi_nxt;
        !           158: };
        !           159:
        !           160: /*
        !           161:  * Declarations
        !           162:  */
        !           163: FILE          *setmountent();
        !           164: mntent_t       *getmountent();
        !           165: mntent_t       *newmountent();
        !           166: void           endmountent();
        !           167:
        !           168: #endif /* __filesys_h__ */