libzfs_impl.h revision 78f171005391b928aaf1642b3206c534ed644332
5b6e0c463149a26dd0aeb4c1f70611c97161ff32dougm * CDDL HEADER SART
fa9e4066f08beec538e775443c5be79dd423fcabahrens * The contents of this file are subject to the terms of the
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock * Common Development and Distribution License (the "License").
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock * You may not use this file except in compliance with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens * See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens * and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * If applicable, add the following below this CDDL HEADER, with the
fa9e4066f08beec538e775443c5be79dd423fcabahrens * fields enclosed by brackets "[]" replaced with your own identifying
fa9e4066f08beec538e775443c5be79dd423fcabahrens * information: Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER END
99d5e173470cf967aa87653364ed614299e7b511Tim Haley * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens * Copyright (c) 2013 by Delphix. All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrensextern "C" {
069f55e237020c4a4907b235fc38fafc6442ce94Eric Schrocktypedef struct libzfs_fru {
99d5e173470cf967aa87653364ed614299e7b511Tim Haley int libzfs_storeerr; /* stuff error messages into buffer */
5b6e0c463149a26dd0aeb4c1f70611c97161ff32dougm#define ZFSSHARE_MISS 0x01 /* Didn't find entry in cache */
a2eea2e101e6a163a537dcc6d4e3c4da2a0ea5b2ahrens zfs_type_t zfs_head_type; /* type excluding snapshot */
e9dbad6f263d5570ed7ff5443ec5b958af8c24d7eschrock * This is different from checking zfs_type, because it will also catch
e9dbad6f263d5570ed7ff5443ec5b958af8c24d7eschrock * snapshots of volumes.
a2eea2e101e6a163a537dcc6d4e3c4da2a0ea5b2ahrens#define ZFS_IS_VOLUME(zhp) ((zhp)->zfs_head_type == ZFS_TYPE_VOLUME)
19b94df933188a15d4f0d6c568f0bab3f127892eMatthew Ahrenstypedef enum {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The following can be used as a bitmask and any new values
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * added must preserve that capability.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwtypedef enum {
ece3d9b3bacef51a5f34d993935eedbb7bb87059llingint zfs_error_fmt(libzfs_handle_t *, int, const char *, ...);
99653d4ee642c6528e88224f12409a5f23060994eschrockvoid zfs_error_aux(libzfs_handle_t *, const char *, ...);
e9dbad6f263d5570ed7ff5443ec5b958af8c24d7eschrockvoid *zfs_realloc(libzfs_handle_t *, void *, size_t, size_t);
99d5e173470cf967aa87653364ed614299e7b511Tim Haleychar *zfs_asprintf(libzfs_handle_t *, const char *, ...);
ece3d9b3bacef51a5f34d993935eedbb7bb87059llingint zfs_standard_error(libzfs_handle_t *, int, const char *);
ece3d9b3bacef51a5f34d993935eedbb7bb87059llingint zfs_standard_error_fmt(libzfs_handle_t *, int, const char *, ...);
ece3d9b3bacef51a5f34d993935eedbb7bb87059llingint zpool_standard_error(libzfs_handle_t *, int, const char *);
ece3d9b3bacef51a5f34d993935eedbb7bb87059llingint zpool_standard_error_fmt(libzfs_handle_t *, int, const char *, ...);
3bb79bece53191f2cf27aa61a72ea1784a7ce700eschrockint get_dependents(libzfs_handle_t *, boolean_t, const char *, char ***,
19b94df933188a15d4f0d6c568f0bab3f127892eMatthew Ahrenszfs_handle_t *make_dataset_handle_zc(libzfs_handle_t *, zfs_cmd_t *);
990b4856d0eaada6f8140335733a1b1771ed2746llingint zprop_parse_value(libzfs_handle_t *, nvpair_t *, int, zfs_type_t,
990b4856d0eaada6f8140335733a1b1771ed2746llingint zprop_expand_list(libzfs_handle_t *hdl, zprop_list_t **plp,
0069fd67511146f5f43175204d5b71d2b357be71Tim Haley * Use this changelist_gather() flag to force attempting mounts
0069fd67511146f5f43175204d5b71d2b357be71Tim Haley * on each change node regardless of whether or not it is currently
e9dbad6f263d5570ed7ff5443ec5b958af8c24d7eschrockint zcmd_alloc_dst_nvlist(libzfs_handle_t *, zfs_cmd_t *, size_t);
990b4856d0eaada6f8140335733a1b1771ed2746llingint zcmd_write_src_nvlist(libzfs_handle_t *, zfs_cmd_t *, nvlist_t *);
990b4856d0eaada6f8140335733a1b1771ed2746llingint zcmd_write_conf_nvlist(libzfs_handle_t *, zfs_cmd_t *, nvlist_t *);
e9dbad6f263d5570ed7ff5443ec5b958af8c24d7eschrockint zcmd_expand_dst_nvlist(libzfs_handle_t *, zfs_cmd_t *);
e9dbad6f263d5570ed7ff5443ec5b958af8c24d7eschrockint zcmd_read_dst_nvlist(libzfs_handle_t *, zfs_cmd_t *, nvlist_t **);
fa9e4066f08beec538e775443c5be79dd423fcabahrensvoid changelist_rename(prop_changelist_t *, const char *, const char *);
3cb34c601f3ef3016f638574f5982e80c3735c71ahrensvoid changelist_remove(prop_changelist_t *, const char *);
0069fd67511146f5f43175204d5b71d2b357be71Tim Haleyprop_changelist_t *changelist_gather(zfs_handle_t *, zfs_prop_t, int, int);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwint changelist_unshare(prop_changelist_t *, zfs_share_proto_t *);
d87468da622d0a816b26cc636aa7dcc08249300ermboolean_t isa_child_of(const char *dataset, const char *parent);
99653d4ee642c6528e88224f12409a5f23060994eschrockzfs_handle_t *make_dataset_handle(libzfs_handle_t *, const char *);
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrenszfs_handle_t *make_bookmark_handle(zfs_handle_t *, const char *,
94de1d4cf6ec0a3bf040dcc4b8df107c4ed36b51eschrockint zpool_open_silent(libzfs_handle_t *, const char *, zpool_handle_t **);
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gwboolean_t zpool_name_valid(libzfs_handle_t *, boolean_t, const char *);
99d5e173470cf967aa87653364ed614299e7b511Tim Haleyint zfs_validate_name(libzfs_handle_t *hdl, const char *path, int type,
6733190958bbcc0bd6d1d601e7ae0a6994dafb45dougm * libshare (sharemgr) interfaces used internally.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw const char *, zfs_share_proto_t *);
069f55e237020c4a4907b235fc38fafc6442ce94Eric Schrockextern void libzfs_fru_clear(libzfs_handle_t *, boolean_t);
4445fffbbb1ea25fd0e9ea68b9380dd7a6709025Matthew Ahrens#endif /* _LIBZFS_IMPL_H */