コード例 #1
0
/* ARGSUSED */
static int
objfs_init(int fstype, char *name)
{
	vfsops_t *vfsops;
	int error;

	objfs_fstype = fstype;
	if (error = vfs_setfsops(fstype, objfs_vfstops, &vfsops)) {
		cmn_err(CE_WARN, "objfs_init: bad vfs ops template");
		return (error);
	}

	if (error = gfs_make_opsvec(objfs_opsvec)) {
		(void) vfs_freevfsops(vfsops);
		return (error);
	}

	if ((objfs_major = getudev()) == (major_t)-1) {
		cmn_err(CE_WARN, "objfs_init: can't get unique device number");
		objfs_major = 0;
	}

	objfs_data_init();

	return (0);
}
コード例 #2
0
ファイル: zfs_ctldir.c プロジェクト: krauter/zfs-1
/*
 * Initialize the various GFS pieces we'll need to create and manipulate .zfs
 * directories.  This is called from the ZFS init routine, and initializes the
 * vnode ops vectors that we'll be using.
 */
void
zfsctl_init(void)
{
#ifdef sun
	VERIFY(gfs_make_opsvec(zfsctl_opsvec) == 0);
#endif
}
コード例 #3
0
ファイル: xattr.c プロジェクト: pcd1193182/openzfs
void
xattr_init(void)
{
	VERIFY(gfs_make_opsvec(xattr_opsvec) == 0);
}
コード例 #4
0
ファイル: zfs_ctldir.c プロジェクト: glycerine/zfs
/*
 * Initialize the various GFS pieces we'll need to create and manipulate .zfs
 * directories.  This is called from the ZFS init routine, and initializes the
 * vnode ops vectors that we'll be using.
 */
void
zfsctl_init(void)
{
	VERIFY(gfs_make_opsvec(zfsctl_opsvec) == 0);
}