/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1998 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#ifndef _SYS_VFS_H
#define _SYS_VFS_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Data associated with mounted file systems.
*/
/*
* File system identifier. Should be unique (at least per machine).
*/
typedef struct {
} fsid_t;
/*
* File identifier. Should be unique per filesystem on a single
* machine. This is typically called by a stateless file server
* in order to generate "file handles".
*/
typedef struct fid {
} fid_t;
/*
* Structure per mounted file system. Each mounted file system has
* an array of operations and an instance record. The file systems
* are kept on a singly linked list headed by "rootvfs" and terminated
* by NULL.
*/
typedef struct vfs {
} vfs_t;
/*
* VFS flags.
*/
/*
* Argument structure for mount(2).
*/
struct mounta {
char *spec;
char *dir;
int flags;
char *fstype;
char *dataptr;
int datalen;
};
/*
* Reasons for calling the vfs_mountroot() operation.
*/
/*
* Operations supported on virtual file system.
*/
typedef struct vfsops {
#if defined(__STDC__)
struct cred *);
#else
int (*vfs_mount)(); /* mount file system */
int (*vfs_unmount)(); /* unmount file system */
int (*vfs_root)(); /* get root vnode */
int (*vfs_statvfs)(); /* get file system statistics */
int (*vfs_sync)(); /* flush fs buffers */
int (*vfs_vget)(); /* get vnode from fid */
int (*vfs_mountroot)(); /* mount the root filesystem */
int (*vfs_swapvp)(); /* return vnode for swap */
#endif
} vfsops_t;
/*
* Filesystem type switch table.
*/
typedef struct vfssw {
#if defined(__STDC__)
#else
#endif
} vfssw_t;
/*
* Public operations.
*/
#if defined(__STDC__)
void vfs_mountroot(void);
void vfs_remove(struct vfs *);
void vfs_unlock(struct vfs *);
struct vfssw *vfs_getvfssw(char *);
#else
extern void vfs_mountroot(); /* mount the root */
extern void vfs_add(); /* add a new vfs to mounted vfs list */
extern void vfs_remove(); /* remove a vfs from mounted vfs list */
extern int vfs_lock(); /* lock a vfs */
extern void vfs_unlock(); /* unlock a vfs */
#endif
(vfsp)->vfs_nsubmounts = 0; \
}
/*
* Globals.
*/
extern char rootfstype[]; /* name of root fstype */
extern int nfstype; /* # of elements in vfssw array */
/*
* file system statistics, from SunOS 4.1
*/
#if _FILE_OFFSET_BITS == 32
struct statfs {
};
struct statfs {
};
#endif
#if defined(_LARGEFILE64_SOURCE)
struct statfs64 {
};
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_VFS_H */