fstyp_handle
fstyp_handle_t fstyp_handle;
if (fstyp_init(rfd, probe_offset, NULL, &fstyp_handle) != 0) {
if ((fstyp_ident(fstyp_handle, NULL, &fstype) != 0) ||
(fstyp_get_attr(fstyp_handle, &fsattr) != 0)) {
fstyp_fini(fstyp_handle);
fstyp_fini(fstyp_handle);
static void fstyp_unload_module(struct fstyp_handle *h,
struct fstyp_handle *h;
if ((h = calloc(1, sizeof (struct fstyp_handle))) == NULL) {
fstyp_fini(struct fstyp_handle *h)
fstyp_ident(struct fstyp_handle *h, const char *fsname, const char **ident)
fstyp_ident_all(struct fstyp_handle *h, const char **ident)
fstyp_ident_one(struct fstyp_handle *h, const char *fsname, const char **ident)
fstyp_get_attr(struct fstyp_handle *h, nvlist_t **attr)
fstyp_dump(struct fstyp_handle *h, FILE *fout, FILE *ferr)
fstyp_strerror(struct fstyp_handle *h, int error)
fstyp_find_module_by_name(struct fstyp_handle *h, const char *fsname)
fstyp_init_module(struct fstyp_handle *h, char *mdir, char *fsname,
fstyp_fini_module(struct fstyp_handle *h, fstyp_module_t *mp)
fstyp_init_all_modules(struct fstyp_handle *h)
fstyp_fini_all_modules(struct fstyp_handle *h)
fstyp_load_module(struct fstyp_handle *h, fstyp_module_t *mp)
fstyp_unload_module(struct fstyp_handle *h, fstyp_module_t *mp)
static int fstyp_ident_all(struct fstyp_handle *h, const char **ident);
static int fstyp_ident_one(struct fstyp_handle *h, const char *fsname,
static fstyp_module_t *fstyp_find_module_by_name(struct fstyp_handle *h,
static int fstyp_init_module(struct fstyp_handle *h,
static void fstyp_fini_module(struct fstyp_handle *h,
static int fstyp_init_all_modules(struct fstyp_handle *h);
static void fstyp_fini_all_modules(struct fstyp_handle *h);
static int fstyp_load_module(struct fstyp_handle *h,
typedef struct fstyp_handle *fstyp_handle_t;