Lines Matching defs:fs
308 grub_fs_init(grub_fs_t *fs)
310 assert(fs);
311 if ((fs->gf_lzfh = libzfs_init()) == NULL ||
312 (fs->gf_diroot = di_init("/", DINFOCPYALL | DINFOPATH))
314 (fs->gf_dvlh = di_devlink_init(NULL, 0)) == DI_LINK_NIL) {
321 grub_fs_fini(grub_fs_t *fs)
323 if (fs == NULL)
326 if (fs->gf_dvlh != DI_LINK_NIL)
327 (void) di_devlink_fini(&fs->gf_dvlh);
328 if (fs->gf_diroot != DI_NODE_NIL)
329 di_fini(fs->gf_diroot);
330 if (fs->gf_lzfh != NULL)
331 libzfs_fini(fs->gf_lzfh);
332 (void) memset(fs, 0, sizeof (*fs));