1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
'\" te
.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
.\" 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.
.\" 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.
.\" 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]
.TH FSTYP_MOD_INIT 3FSTYP "Jun 29, 2006"
.SH NAME
fstyp_mod_init, fstyp_mod_fini, fstyp_mod_ident, fstyp_mod_get_attr,
fstyp_mod_dump \- libfstyp module interface
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lfstyp\fR \fB -lnvpair \fR [ \fIlibrary\fR\&.\|.\|. ]
#include <libnvpair.h>
#include <libfstyp.h>
\fBint\fR \fBfstyp_mod_init\fR(\fBint\fR \fIfd\fR, \fBoff64_t **\fR\fIoffset\fR, \fBfstyp_mod_handle_t *\fR\fIhandle\fR);
.fi
.LP
.nf
\fBvoid\fR \fBfstyp_mod_fini\fR(\fBfstyp_mod_handle_t\fR \fIhandle\fR);
.fi
.LP
.nf
\fBint\fR \fBfstyp_mod_ident\fR(\fBfstyp_mod_handle_t\fR \fIhandle\fR);
.fi
.LP
.nf
\fBint\fR \fBfstyp_mod_get_attr\fR(\fBfstyp_mod_handle_t\fR \fIhandle\fR, \fBnvlist_t **\fR\fIattr\fR);
.fi
.LP
.nf
\fBint\fR \fBfstyp_mod_dump\fR(\fBfstyp_mod_handle_t\fR \fIhandle\fR, \fBFILE *\fR\fIfout\fR, \fBFILE *\fR\fIferr\fR);
.fi
.SH PARAMETERS
.sp
.ne 2
.na
\fB\fIfd\fR\fR
.ad
.RS 10n
Open file descriptor of a block or a raw device that contains the file system
to be identified.
.RE
.sp
.ne 2
.na
\fB\fIoffset\fR\fR
.ad
.RS 10n
Offset from the beginning of the device where the file system is located.
.RE
.sp
.ne 2
.na
\fB\fIhandle\fR\fR
.ad
.RS 10n
Opaque handle that the module returns in \fBfstyp_mod_init()\fR and is used
with other module functions.
.RE
.sp
.ne 2
.na
\fB\fIfout\fR\fR
.ad
.RS 10n
Output stream.
.RE
.sp
.ne 2
.na
\fB\fIferr\fR\fR
.ad
.RS 10n
Error stream.
.RE
.SH DESCRIPTION
.sp
.LP
A \fBlibfstyp\fR module implements heuristics required to identify a file
system type. The modules are shared objects loaded by \fBlibfstyp\fR. The
\fBlibfstyp\fR modules are located in \fB/usr/lib/fs\fR subdirectories. A
subdirectory name defines the name of the file system.
.sp
.LP
Each module exports the \fBfstyp_mod_init()\fR, \fBfstyp_mod_fini()\fR,
\fBfstyp_mod_ident()\fR, and \fBfstyp_mod_get_attr()\fR functions. All of these
functions map directly to the respective \fBlibfstyp\fR interfaces.
.sp
.LP
The \fBfstyp_mod_dump()\fR function is optional. It can be used to output
unformatted information about the file system. This function is used by the
\fBfstyp\fR(8) command when the \fB-v\fR option is specified. The
\fBfstyp_mod_dump()\fR function is not recommended and should be used only in
legacy modules.
.SH FILES
.sp
.ne 2
.na
\fB\fB/usr/lib/fs/\fR\fR
.ad
.sp .6
.RS 4n
Default module directory.
.RE
.sp
.ne 2
.na
\fB\fB/usr/lib/fs/\fIfstype\fR/fstyp.so.1\fR\fR
.ad
.sp .6
.RS 4n
Default path to a \fBlibfstyp\fR module for an \fIfstype\fR file system.
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Evolving
_
MT-Level MT-Safe
.TE
.SH SEE ALSO
.sp
.LP
.BR fstyp_strerror (3FSTYP),
.BR libfstyp (3LIB),
.BR attributes (7),
.BR fstyp (8)
|