Searched refs:g_zfs (Results 1 - 13 of 13) sorted by relevance

/freebsd-head/sys/contrib/openzfs/cmd/zfs/
H A Dzfs_util.h36 extern libzfs_handle_t *g_zfs;
H A Dzfs_main.c86 libzfs_handle_t *g_zfs; variable
845 if ((zhp = zfs_open(g_zfs, argv[0], ZFS_TYPE_SNAPSHOT)) == NULL) {
857 if (zfs_dataset_exists(g_zfs, argv[1], ZFS_TYPE_FILESYSTEM |
863 if (zfs_create_ancestors(g_zfs, argv[1]) != 0) {
876 (void) zpool_log_history(g_zfs, history_str);
880 ret = zfs_mount_and_share(g_zfs, argv[1], ZFS_TYPE_DATASET);
944 if (zfs_nicestrtonum(g_zfs, optarg, &intval) != 0) {
947 libzfs_error_description(g_zfs));
965 if (zfs_nicestrtonum(g_zfs, optarg, &intval) != 0) {
968 libzfs_error_description(g_zfs));
[all...]
H A Dzfs_iter.c455 ret = zfs_iter_root(g_zfs, zfs_callback, &cb);
475 zhp = zfs_path_to_zhandle(g_zfs, argv[i],
478 zhp = zfs_open(g_zfs, argv[i], argtype);
/freebsd-head/sys/contrib/openzfs/cmd/zinject/
H A Dzinject.c159 libzfs_handle_t *g_zfs; variable
341 while (zfs_ioctl(g_zfs, ZFS_IOC_INJECT_LIST_NEXT, &zc) == 0)
509 if (zfs_ioctl(g_zfs, ZFS_IOC_CLEAR_FAULT, &zc) != 0) {
542 if (zfs_ioctl(g_zfs, ZFS_IOC_CLEAR_FAULT, &zc) != 0) {
566 if (zfs_ioctl(g_zfs, ZFS_IOC_INJECT_FAULT, &zc) != 0) {
626 if (zfs_ioctl(g_zfs, ZFS_IOC_VDEV_SET_STATE, &zc) == 0)
763 if ((g_zfs = libzfs_init()) == NULL) {
768 libzfs_print_on_error(g_zfs, B_TRUE);
772 libzfs_fini(g_zfs);
787 libzfs_fini(g_zfs);
[all...]
H A Dzinject.h64 extern libzfs_handle_t *g_zfs;
H A Dtranslate.c137 if ((zhp = zfs_open(g_zfs, dataset, ZFS_TYPE_DATASET)) == NULL)
343 if ((zhp = zpool_open(g_zfs, pool)) == NULL)
/freebsd-head/sys/contrib/openzfs/cmd/zfs_ids_to_path/
H A Dzfs_ids_to_path.c33 libzfs_handle_t *g_zfs; variable
73 if ((g_zfs = libzfs_init()) == NULL) {
77 zpool_handle_t *pool = zpool_open(g_zfs, argv[0]);
80 libzfs_fini(g_zfs);
94 libzfs_fini(g_zfs);
/freebsd-head/sys/contrib/openzfs/cmd/zpool/
H A Dzpool_util.h82 extern libzfs_handle_t *g_zfs;
107 libzfs_handle_t *g_zfs; member in struct:vdev_cmd_data_list
122 char *cmd, libzfs_handle_t *g_zfs, char **vdev_names, int vdev_names_count,
H A Dzpool_iter.c132 (void) zpool_iter(g_zfs, add_pool, zlp);
140 if ((zhp = zpool_open_canfail(g_zfs, argv[i])) !=
162 (void) zpool_iter(g_zfs, add_pool, zlp);
621 vname = zpool_vdev_name(g_zfs, zhp, nv, vcdl->cb_name_flags);
693 * to run the command on only certain vdevs, fill in g_zfs, vdev_names,
701 libzfs_handle_t *g_zfs, char **vdev_names, int vdev_names_count,
711 vcdl->g_zfs = g_zfs;
700 all_pools_for_each_vdev_run(int argc, char **argv, char *cmd, libzfs_handle_t *g_zfs, char **vdev_names, int vdev_names_count, int cb_name_flags) argument
H A Dzpool_main.c78 libzfs_handle_t *g_zfs; variable
444 char *path = zpool_vdev_name(g_zfs, zhp, nvroot,
624 zhp = zpool_open(g_zfs, poolname);
688 vname = zpool_vdev_name(g_zfs, zhp, child[c], name_flags);
890 if ((zhp = zpool_open(g_zfs, poolname)) == NULL)
977 vname = zpool_vdev_name(g_zfs, NULL,
988 vname = zpool_vdev_name(g_zfs, NULL,
1057 if ((zhp = zpool_open(g_zfs, poolname)) == NULL)
1210 ret = zpool_in_use(g_zfs, fd, &state, &name, &inuse);
1585 if (zpool_create(g_zfs, poolnam
[all...]
H A Dzpool_vdev.c130 if (zpool_in_use(g_zfs, fd, &state, &name, &inuse) == 0 && inuse) {
228 if (zpool_in_use(g_zfs, fd, &state, &name, &inuse) != 0 ||
976 if (zpool_label_disk(g_zfs, zhp, devnode) == -1)
/freebsd-head/sys/contrib/openzfs/cmd/mount_zfs/
H A Dmount_zfs.c43 libzfs_handle_t *g_zfs; variable
285 if ((g_zfs = libzfs_init()) == NULL) {
291 if ((zhp = zfs_open(g_zfs, dataset,
295 libzfs_fini(g_zfs);
321 libzfs_fini(g_zfs);
/freebsd-head/sys/contrib/openzfs/contrib/pam_zfs_key/
H A Dpam_zfs_key.c68 static libzfs_handle_t *g_zfs; variable
191 if ((g_zfs = libzfs_init()) == NULL) {
202 libzfs_fini(g_zfs);
271 zfs_handle_t *ds = zfs_open(g_zfs, ds_name, ZFS_TYPE_FILESYSTEM);
285 zfs_handle_t *ds = zfs_open(g_zfs, ds_name, ZFS_TYPE_FILESYSTEM);
333 zfs_handle_t *ds = zfs_open(g_zfs, ds_name, ZFS_TYPE_FILESYSTEM);
364 zfs_handle_t *ds = zfs_open(g_zfs, ds_name, ZFS_TYPE_FILESYSTEM);

Completed in 183 milliseconds