1fstyp_init(3FSTYFPi)le System Type Identification Library Functifosntsyp_init(3FSTYP)
2
3
4

NAME

6       fstyp_init, fstyp_fini - initialize and finalize libfstyp handle
7

SYNOPSIS

9       cc [ flag... ] file... -lfstyp  -lnvpair  [ library... ]
10       #include <libnvpair.h>
11       #include <libfstyp.h>
12
13       int fstyp_init(int fd, off64_t **offset, char *module_dir,
14            fstyp_handle_t *handle);
15
16
17       void fstyp_fini(void *handle);
18
19

PARAMETERS

21       fd            Open file descriptor of a block or a raw device that con‐
22                     tains the file system to be identified.
23
24
25       offset        Offset from the beginning of the device  where  the  file
26                     system is located.
27
28
29       module_dir    Optional location of the libfstyp modules.
30
31
32       handle        Opaque handle to be used with libfstyp functions.
33
34

DESCRIPTION

36       The  fstyp_init()  function returns a handle associated with the speci‐
37       fied parameters. This handle should be used  with  all  other  libfstyp
38       functions.
39
40
41       If  module_dir  is  NULL, fstyp_init() looks for modules in the default
42       location: /usr/lib/fs subdirectories. The fstyp_init() function locates
43       libfstyp  modules, but might defer loading the modules until the subse‐
44       quent fstyp_ident() call.
45
46
47       If module_dir is other than NULL, the fstyp_init() function  locates  a
48       module  in  the  directory  that  is  specified. If no module is found,
49       fstyp_init fails with FSTYP_ERR_MOD_NOT_FOUND.
50
51
52       Modules that do not support non-zero offset can fail fstyp_init()  with
53       FSTYP_ERR_OFFSET.
54
55
56       The fstyp_fini() function releases all resources associated with a han‐
57       dle and invalidates the handle.
58

RETURN VALUES

60       The fstyp_init() function returns 0 on success and an  error  value  on
61       failure. See fstyp_strerror(3FSTYP).
62

ATTRIBUTES

64       See attributes(5) for descriptions of the following attributes:
65
66
67
68
69       ┌─────────────────────────────┬─────────────────────────────┐
70       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
71       ├─────────────────────────────┼─────────────────────────────┤
72       │Interface Stability          │Evolving                     │
73       ├─────────────────────────────┼─────────────────────────────┤
74       │MT-Level                     │MT-Safe                      │
75       └─────────────────────────────┴─────────────────────────────┘
76

SEE ALSO

78       fstyp_ident(3FSTYP),   fstyp_mod_init(3FSTYP),  fstyp_strerror(3FSTYP),
79       libfstyp(3LIB), attributes(5)
80
81
82
83SunOS 5.11                        20 Jun 2006               fstyp_init(3FSTYP)
Impressum