2 .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" 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]
6 .TH FSTYP_INIT 3FSTYP "Jun 20, 2006"
8 fstyp_init, fstyp_fini \- initialize and finalize libfstyp handle
12 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lfstyp\fR \fB -lnvpair \fR [ \fIlibrary\fR\&.\|.\|. ]
13 #include <libnvpair.h>
16 \fBint\fR \fBfstyp_init\fR(\fBint\fR \fIfd\fR, \fBoff64_t **\fR\fIoffset\fR, \fBchar *\fR\fImodule_dir\fR,
17 \fBfstyp_handle_t *\fR\fIhandle\fR);
22 \fBvoid\fR \fBfstyp_fini\fR(\fBvoid *\fR\fIhandle\fR);
32 Open file descriptor of a block or a raw device that contains the file system
42 Offset from the beginning of the device where the file system is located.
48 \fB\fImodule_dir\fR\fR
51 Optional location of the \fBlibfstyp\fR modules.
60 Opaque handle to be used with \fBlibfstyp\fR functions.
66 The \fBfstyp_init()\fR function returns a \fIhandle\fR associated with the
67 specified parameters. This \fIhandle\fR should be used with all other
68 \fBlibfstyp\fR functions.
71 If \fImodule_dir\fR is \fINULL\fR, \fBfstyp_init()\fR looks for modules in the
72 default location: \fB/usr/lib/fs\fR subdirectories. The \fBfstyp_init()\fR
73 function locates \fBlibfstyp\fR modules, but might defer loading the modules
74 until the subsequent \fBfstyp_ident()\fR call.
77 If \fImodule_dir\fR is other than \fINULL\fR, the \fBfstyp_init()\fR function
78 locates a module in the directory that is specified. If no module is found,
79 \fBfstyp_init\fR fails with \fBFSTYP_ERR_MOD_NOT_FOUND\fR.
82 Modules that do not support non-zero offset can fail \fBfstyp_init()\fR with
83 \fBFSTYP_ERR_OFFSET\fR.
86 The \fBfstyp_fini()\fR function releases all resources associated with a handle
87 and invalidates the handle.
91 The \fBfstyp_init()\fR function returns \fB0\fR on success and an error value
92 on failure. See \fBfstyp_strerror\fR(3FSTYP).
96 See \fBattributes\fR(5) for descriptions of the following attributes:
104 ATTRIBUTE TYPE ATTRIBUTE VALUE
106 Interface Stability Evolving
114 \fBfstyp_ident\fR(3FSTYP), \fBfstyp_mod_init\fR(3FSTYP),
115 \fBfstyp_strerror\fR(3FSTYP), \fBlibfstyp\fR(3LIB), \fBattributes\fR(5)