Lines Matching defs:g_zfs
60 static libzfs_handle_t *g_zfs = NULL;
97 if (g_zfs == NULL)
98 g_zfs = libzfs_init();
99 if (g_zfs == NULL) {
111 if ((zfs_create(g_zfs, nm, ZFS_TYPE_FILESYSTEM, NULL)
113 ((zhp = zfs_open(g_zfs, nm, ZFS_TYPE_FILESYSTEM)) ==
116 libzfs_error_description(g_zfs));
117 libzfs_fini(g_zfs);
118 g_zfs = NULL;
124 libzfs_error_description(g_zfs));
127 libzfs_fini(g_zfs);
128 g_zfs = NULL;
139 libzfs_fini(g_zfs);
140 g_zfs = NULL;
155 if (g_zfs != NULL) {
156 libzfs_fini(g_zfs);
157 g_zfs = NULL;
166 if (g_zfs != NULL) {
167 libzfs_fini(g_zfs);
168 g_zfs = NULL;
182 if (g_zfs != NULL) {
183 libzfs_fini(g_zfs);
184 g_zfs = NULL;
198 if (g_zfs != NULL) {
199 libzfs_fini(g_zfs);
200 g_zfs = NULL;
206 if (g_zfs != NULL) {
207 libzfs_fini(g_zfs);
208 g_zfs = NULL;
230 if (g_zfs == NULL)
231 g_zfs = libzfs_init();
233 if (g_zfs == NULL) {
241 if ((zhp = zfs_open(g_zfs, nm, ZFS_TYPE_FILESYSTEM))
246 libzfs_fini(g_zfs);
247 g_zfs = NULL;
252 libzfs_error_description(g_zfs));
257 libzfs_fini(g_zfs);
258 g_zfs = NULL;
266 if (g_zfs != NULL) {
267 libzfs_fini(g_zfs);
268 g_zfs = NULL;