From 327c904615db9cfcd8c9e07cb56b8e36050a4048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Thu, 3 Jun 2021 23:50:07 +0200 Subject: [PATCH] lib{efi,avl,share,tpool,zfs_core,zfsbootenv,zutil}: -fvisibility=hidden MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No symbols affected in libavl No symbols affected by libtpool, but pre-ANSI declarations got purged No symbols affected by libzfs_core No symbols affected by libzfs_bootenv libefi got cleaned, gained efi_debug documentation in efi_partition.h, and removes one undocumented and unused symbol from libzfs_core: D default_vtoc_map libnvpair saw removal of these symbols: D nv_alloc_nosleep_def D nv_alloc_sleep D nv_alloc_sleep_def D nv_fixed_ops_def D nvlist_hashtable_init_size D nvpair_max_recursion libshare saw removal of these symbols from libzfs: T libshare_nfs_init T libshare_smb_init T register_fstype B smb_shares libzutil saw removal of these internal symbols from libzfs_core: T label_paths T slice_cache_compare T zpool_find_import_blkid T zpool_open_func T zutil_alloc T zutil_strdup Reviewed-by: Matthew Ahrens Reviewed-by: John Kennedy Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #12191 --- include/libnvpair.h | 37 +- include/libzfs_core.h | 130 +- include/libzfsbootenv.h | 20 +- include/sys/avl.h | 36 +- include/sys/avl_impl.h | 5 +- include/sys/efi_partition.h | 19 +- include/sys/nvpair.h | 427 +++--- include/thread_pool.h | 36 +- lib/libavl/Makefile.am | 1 + lib/libefi/Makefile.am | 1 + lib/libefi/rdwr_efi.c | 34 - lib/libnvpair/Makefile.am | 1 + lib/libnvpair/libnvpair.abi | 2484 +++++++++++++++---------------- lib/libshare/Makefile.am | 2 + lib/libshare/nfs.c | 2 +- lib/libshare/os/freebsd/nfs.c | 2 +- lib/libshare/os/linux/nfs.c | 2 +- lib/libspl/include/libshare.h | 14 +- lib/libtpool/Makefile.am | 2 + lib/libzfs/libzfs.abi | 183 +-- lib/libzfs_core/Makefile.am | 2 + lib/libzfs_core/libzfs_core.abi | 1629 ++++++++++---------- lib/libzfsbootenv/Makefile.am | 2 + lib/libzutil/Makefile.am | 1 + 24 files changed, 2493 insertions(+), 2579 deletions(-) diff --git a/include/libnvpair.h b/include/libnvpair.h index 5277f9574..bc50c3b7e 100644 --- a/include/libnvpair.h +++ b/include/libnvpair.h @@ -24,7 +24,7 @@ */ #ifndef _LIBNVPAIR_H -#define _LIBNVPAIR_H +#define _LIBNVPAIR_H extern __attribute__((visibility("default"))) #include #include @@ -42,13 +42,13 @@ extern "C" { * are all imported from included above. */ -extern int nvpair_value_match(nvpair_t *, int, char *, char **); -extern int nvpair_value_match_regex(nvpair_t *, int, char *, regex_t *, +_LIBNVPAIR_H int nvpair_value_match(nvpair_t *, int, char *, char **); +_LIBNVPAIR_H int nvpair_value_match_regex(nvpair_t *, int, char *, regex_t *, char **); -extern void nvlist_print(FILE *, nvlist_t *); -int nvlist_print_json(FILE *, nvlist_t *); -extern void dump_nvlist(nvlist_t *, int); +_LIBNVPAIR_H void nvlist_print(FILE *, nvlist_t *); +_LIBNVPAIR_H int nvlist_print_json(FILE *, nvlist_t *); +_LIBNVPAIR_H void dump_nvlist(nvlist_t *, int); /* * Private nvlist printing interface that allows the caller some control @@ -88,18 +88,18 @@ enum nvlist_indent_mode { NVLIST_INDENT_TABBED /* Indent with tabstops */ }; -extern nvlist_prtctl_t nvlist_prtctl_alloc(void); -extern void nvlist_prtctl_free(nvlist_prtctl_t); -extern void nvlist_prt(nvlist_t *, nvlist_prtctl_t); +_LIBNVPAIR_H nvlist_prtctl_t nvlist_prtctl_alloc(void); +_LIBNVPAIR_H void nvlist_prtctl_free(nvlist_prtctl_t); +_LIBNVPAIR_H void nvlist_prt(nvlist_t *, nvlist_prtctl_t); /* Output stream */ -extern void nvlist_prtctl_setdest(nvlist_prtctl_t, FILE *); -extern FILE *nvlist_prtctl_getdest(nvlist_prtctl_t); +_LIBNVPAIR_H void nvlist_prtctl_setdest(nvlist_prtctl_t, FILE *); +_LIBNVPAIR_H FILE *nvlist_prtctl_getdest(nvlist_prtctl_t); /* Indentation mode, start indent, indent increment; default tabbed/0/1 */ -extern void nvlist_prtctl_setindent(nvlist_prtctl_t, enum nvlist_indent_mode, - int, int); -extern void nvlist_prtctl_doindent(nvlist_prtctl_t, int); +_LIBNVPAIR_H void nvlist_prtctl_setindent(nvlist_prtctl_t, + enum nvlist_indent_mode, int, int); +_LIBNVPAIR_H void nvlist_prtctl_doindent(nvlist_prtctl_t, int); enum nvlist_prtctl_fmt { NVLIST_FMT_MEMBER_NAME, /* name fmt; default "%s = " */ @@ -107,9 +107,10 @@ enum nvlist_prtctl_fmt { NVLIST_FMT_BTWN_ARRAY /* between array members; default " " */ }; -extern void nvlist_prtctl_setfmt(nvlist_prtctl_t, enum nvlist_prtctl_fmt, +_LIBNVPAIR_H void nvlist_prtctl_setfmt(nvlist_prtctl_t, enum nvlist_prtctl_fmt, const char *); -extern void nvlist_prtctl_dofmt(nvlist_prtctl_t, enum nvlist_prtctl_fmt, ...); +_LIBNVPAIR_H void nvlist_prtctl_dofmt(nvlist_prtctl_t, enum nvlist_prtctl_fmt, + ...); /* * Function prototypes for interfaces that appoint a new rendering function @@ -139,7 +140,7 @@ extern void nvlist_prtctl_dofmt(nvlist_prtctl_t, enum nvlist_prtctl_fmt, ...); */ #define NVLIST_PRINTCTL_SVDECL(funcname, valtype) \ - extern void funcname(nvlist_prtctl_t, \ + _LIBNVPAIR_H void funcname(nvlist_prtctl_t, \ int (*)(nvlist_prtctl_t, void *, nvlist_t *, const char *, valtype), \ void *) @@ -170,7 +171,7 @@ NVLIST_PRINTCTL_SVDECL(nvlist_prtctlop_nvlist, nvlist_t *); * Return values as above. */ #define NVLIST_PRINTCTL_AVDECL(funcname, vtype) \ - extern void funcname(nvlist_prtctl_t, \ + _LIBNVPAIR_H void funcname(nvlist_prtctl_t, \ int (*)(nvlist_prtctl_t, void *, nvlist_t *, const char *, vtype, uint_t), \ void *) diff --git a/include/libzfs_core.h b/include/libzfs_core.h index 34161a06f..83d8211ab 100644 --- a/include/libzfs_core.h +++ b/include/libzfs_core.h @@ -27,7 +27,7 @@ */ #ifndef _LIBZFS_CORE_H -#define _LIBZFS_CORE_H +#define _LIBZFS_CORE_H extern __attribute__((visibility("default"))) #include #include @@ -38,41 +38,42 @@ extern "C" { #endif -int libzfs_core_init(void); -void libzfs_core_fini(void); +_LIBZFS_CORE_H int libzfs_core_init(void); +_LIBZFS_CORE_H void libzfs_core_fini(void); /* - * NB: this type should be kept binary compatible with dmu_objset_type_t. + * NB: this type should be kept binary-compatible with dmu_objset_type_t. */ enum lzc_dataset_type { LZC_DATSET_TYPE_ZFS = 2, LZC_DATSET_TYPE_ZVOL }; -int lzc_snapshot(nvlist_t *, nvlist_t *, nvlist_t **); -int lzc_create(const char *, enum lzc_dataset_type, nvlist_t *, uint8_t *, +_LIBZFS_CORE_H int lzc_snapshot(nvlist_t *, nvlist_t *, nvlist_t **); +_LIBZFS_CORE_H int lzc_create(const char *, enum lzc_dataset_type, nvlist_t *, + uint8_t *, uint_t); +_LIBZFS_CORE_H int lzc_clone(const char *, const char *, nvlist_t *); +_LIBZFS_CORE_H int lzc_promote(const char *, char *, int); +_LIBZFS_CORE_H int lzc_destroy_snaps(nvlist_t *, boolean_t, nvlist_t **); +_LIBZFS_CORE_H int lzc_bookmark(nvlist_t *, nvlist_t **); +_LIBZFS_CORE_H int lzc_get_bookmarks(const char *, nvlist_t *, nvlist_t **); +_LIBZFS_CORE_H int lzc_get_bookmark_props(const char *, nvlist_t **); +_LIBZFS_CORE_H int lzc_destroy_bookmarks(nvlist_t *, nvlist_t **); +_LIBZFS_CORE_H int lzc_load_key(const char *, boolean_t, uint8_t *, uint_t); +_LIBZFS_CORE_H int lzc_unload_key(const char *); +_LIBZFS_CORE_H int lzc_change_key(const char *, uint64_t, nvlist_t *, uint8_t *, uint_t); -int lzc_clone(const char *, const char *, nvlist_t *); -int lzc_promote(const char *, char *, int); -int lzc_destroy_snaps(nvlist_t *, boolean_t, nvlist_t **); -int lzc_bookmark(nvlist_t *, nvlist_t **); -int lzc_get_bookmarks(const char *, nvlist_t *, nvlist_t **); -int lzc_get_bookmark_props(const char *, nvlist_t **); -int lzc_destroy_bookmarks(nvlist_t *, nvlist_t **); -int lzc_load_key(const char *, boolean_t, uint8_t *, uint_t); -int lzc_unload_key(const char *); -int lzc_change_key(const char *, uint64_t, nvlist_t *, uint8_t *, uint_t); -int lzc_initialize(const char *, pool_initialize_func_t, nvlist_t *, - nvlist_t **); -int lzc_trim(const char *, pool_trim_func_t, uint64_t, boolean_t, +_LIBZFS_CORE_H int lzc_initialize(const char *, pool_initialize_func_t, nvlist_t *, nvlist_t **); -int lzc_redact(const char *, const char *, nvlist_t *); +_LIBZFS_CORE_H int lzc_trim(const char *, pool_trim_func_t, uint64_t, boolean_t, + nvlist_t *, nvlist_t **); +_LIBZFS_CORE_H int lzc_redact(const char *, const char *, nvlist_t *); -int lzc_snaprange_space(const char *, const char *, uint64_t *); +_LIBZFS_CORE_H int lzc_snaprange_space(const char *, const char *, uint64_t *); -int lzc_hold(nvlist_t *, int, nvlist_t **); -int lzc_release(nvlist_t *, nvlist_t **); -int lzc_get_holds(const char *, nvlist_t **); +_LIBZFS_CORE_H int lzc_hold(nvlist_t *, int, nvlist_t **); +_LIBZFS_CORE_H int lzc_release(nvlist_t *, nvlist_t **); +_LIBZFS_CORE_H int lzc_get_holds(const char *, nvlist_t **); enum lzc_send_flags { LZC_SEND_FLAG_EMBED_DATA = 1 << 0, @@ -82,61 +83,66 @@ enum lzc_send_flags { LZC_SEND_FLAG_SAVED = 1 << 4, }; -int lzc_send(const char *, const char *, int, enum lzc_send_flags); -int lzc_send_resume(const char *, const char *, int, +_LIBZFS_CORE_H int lzc_send(const char *, const char *, int, + enum lzc_send_flags); +_LIBZFS_CORE_H int lzc_send_resume(const char *, const char *, int, enum lzc_send_flags, uint64_t, uint64_t); -int lzc_send_space(const char *, const char *, enum lzc_send_flags, uint64_t *); +_LIBZFS_CORE_H int lzc_send_space(const char *, const char *, + enum lzc_send_flags, uint64_t *); struct dmu_replay_record; -int lzc_send_redacted(const char *, const char *, int, enum lzc_send_flags, - const char *); -int lzc_send_resume_redacted(const char *, const char *, int, +_LIBZFS_CORE_H int lzc_send_redacted(const char *, const char *, int, + enum lzc_send_flags, const char *); +_LIBZFS_CORE_H int lzc_send_resume_redacted(const char *, const char *, int, enum lzc_send_flags, uint64_t, uint64_t, const char *); -int lzc_receive(const char *, nvlist_t *, const char *, boolean_t, boolean_t, - int); -int lzc_receive_resumable(const char *, nvlist_t *, const char *, boolean_t, - boolean_t, int); -int lzc_receive_with_header(const char *, nvlist_t *, const char *, boolean_t, - boolean_t, boolean_t, int, const struct dmu_replay_record *); -int lzc_receive_one(const char *, nvlist_t *, const char *, boolean_t, - boolean_t, boolean_t, int, const struct dmu_replay_record *, int, +_LIBZFS_CORE_H int lzc_receive(const char *, nvlist_t *, const char *, + boolean_t, boolean_t, int); +_LIBZFS_CORE_H int lzc_receive_resumable(const char *, nvlist_t *, const char *, + boolean_t, boolean_t, int); +_LIBZFS_CORE_H int lzc_receive_with_header(const char *, nvlist_t *, + const char *, boolean_t, boolean_t, boolean_t, int, + const struct dmu_replay_record *); +_LIBZFS_CORE_H int lzc_receive_one(const char *, nvlist_t *, const char *, + boolean_t, boolean_t, boolean_t, int, const struct dmu_replay_record *, int, uint64_t *, uint64_t *, uint64_t *, nvlist_t **); -int lzc_receive_with_cmdprops(const char *, nvlist_t *, nvlist_t *, - uint8_t *, uint_t, const char *, boolean_t, boolean_t, boolean_t, int, - const struct dmu_replay_record *, int, uint64_t *, uint64_t *, - uint64_t *, nvlist_t **); -int lzc_send_space(const char *, const char *, enum lzc_send_flags, uint64_t *); -int lzc_send_space_resume_redacted(const char *, const char *, +_LIBZFS_CORE_H int lzc_receive_with_cmdprops(const char *, nvlist_t *, + nvlist_t *, uint8_t *, uint_t, const char *, boolean_t, boolean_t, + boolean_t, int, const struct dmu_replay_record *, int, uint64_t *, + uint64_t *, uint64_t *, nvlist_t **); +_LIBZFS_CORE_H int lzc_send_space(const char *, const char *, + enum lzc_send_flags, uint64_t *); +_LIBZFS_CORE_H int lzc_send_space_resume_redacted(const char *, const char *, enum lzc_send_flags, uint64_t, uint64_t, uint64_t, const char *, int, uint64_t *); -uint64_t lzc_send_progress(int); +_LIBZFS_CORE_H uint64_t lzc_send_progress(int); -boolean_t lzc_exists(const char *); +_LIBZFS_CORE_H boolean_t lzc_exists(const char *); -int lzc_rollback(const char *, char *, int); -int lzc_rollback_to(const char *, const char *); +_LIBZFS_CORE_H int lzc_rollback(const char *, char *, int); +_LIBZFS_CORE_H int lzc_rollback_to(const char *, const char *); -int lzc_rename(const char *, const char *); -int lzc_destroy(const char *); +_LIBZFS_CORE_H int lzc_rename(const char *, const char *); +_LIBZFS_CORE_H int lzc_destroy(const char *); -int lzc_channel_program(const char *, const char *, uint64_t, - uint64_t, nvlist_t *, nvlist_t **); -int lzc_channel_program_nosync(const char *, const char *, uint64_t, +_LIBZFS_CORE_H int lzc_channel_program(const char *, const char *, uint64_t, uint64_t, nvlist_t *, nvlist_t **); +_LIBZFS_CORE_H int lzc_channel_program_nosync(const char *, const char *, + uint64_t, uint64_t, nvlist_t *, nvlist_t **); -int lzc_sync(const char *, nvlist_t *, nvlist_t **); -int lzc_reopen(const char *, boolean_t); +_LIBZFS_CORE_H int lzc_sync(const char *, nvlist_t *, nvlist_t **); +_LIBZFS_CORE_H int lzc_reopen(const char *, boolean_t); -int lzc_pool_checkpoint(const char *); -int lzc_pool_checkpoint_discard(const char *); +_LIBZFS_CORE_H int lzc_pool_checkpoint(const char *); +_LIBZFS_CORE_H int lzc_pool_checkpoint_discard(const char *); -int lzc_wait(const char *, zpool_wait_activity_t, boolean_t *); -int lzc_wait_tag(const char *, zpool_wait_activity_t, uint64_t, boolean_t *); -int lzc_wait_fs(const char *, zfs_wait_activity_t, boolean_t *); +_LIBZFS_CORE_H int lzc_wait(const char *, zpool_wait_activity_t, boolean_t *); +_LIBZFS_CORE_H int lzc_wait_tag(const char *, zpool_wait_activity_t, uint64_t, + boolean_t *); +_LIBZFS_CORE_H int lzc_wait_fs(const char *, zfs_wait_activity_t, boolean_t *); -int lzc_set_bootenv(const char *, const nvlist_t *); -int lzc_get_bootenv(const char *, nvlist_t **); +_LIBZFS_CORE_H int lzc_set_bootenv(const char *, const nvlist_t *); +_LIBZFS_CORE_H int lzc_get_bootenv(const char *, nvlist_t **); #ifdef __cplusplus } #endif diff --git a/include/libzfsbootenv.h b/include/libzfsbootenv.h index b078b605d..cbc8751dc 100644 --- a/include/libzfsbootenv.h +++ b/include/libzfsbootenv.h @@ -14,7 +14,7 @@ */ #ifndef _LIBZFSBOOTENV_H -#define _LIBZFSBOOTENV_H +#define _LIBZFSBOOTENV_H extern __attribute__((visibility("default"))) #ifdef __cplusplus extern "C" { @@ -25,14 +25,16 @@ typedef enum lzbe_flags { lzbe_replace /* replace current nvlist */ } lzbe_flags_t; -extern int lzbe_nvlist_get(const char *, const char *, void **); -extern int lzbe_nvlist_set(const char *, const char *, void *); -extern void lzbe_nvlist_free(void *); -extern int lzbe_add_pair(void *, const char *, const char *, void *, size_t); -extern int lzbe_remove_pair(void *, const char *); -extern int lzbe_set_boot_device(const char *, lzbe_flags_t, const char *); -extern int lzbe_get_boot_device(const char *, char **); -extern int lzbe_bootenv_print(const char *, const char *, FILE *); +_LIBZFSBOOTENV_H int lzbe_nvlist_get(const char *, const char *, void **); +_LIBZFSBOOTENV_H int lzbe_nvlist_set(const char *, const char *, void *); +_LIBZFSBOOTENV_H void lzbe_nvlist_free(void *); +_LIBZFSBOOTENV_H int lzbe_add_pair(void *, const char *, const char *, void *, + size_t); +_LIBZFSBOOTENV_H int lzbe_remove_pair(void *, const char *); +_LIBZFSBOOTENV_H int lzbe_set_boot_device(const char *, lzbe_flags_t, + const char *); +_LIBZFSBOOTENV_H int lzbe_get_boot_device(const char *, char **); +_LIBZFSBOOTENV_H int lzbe_bootenv_print(const char *, const char *, FILE *); #ifdef __cplusplus } diff --git a/include/sys/avl.h b/include/sys/avl.h index ed3c6f86a..20e88f2a6 100644 --- a/include/sys/avl.h +++ b/include/sys/avl.h @@ -28,7 +28,7 @@ */ #ifndef _AVL_H -#define _AVL_H +#define _AVL_H extern __attribute__((visibility("default"))) /* * This is a private header file. Applications should not directly include @@ -160,7 +160,7 @@ typedef uintptr_t avl_index_t; * size - the value of sizeof(struct my_type) * offset - the value of OFFSETOF(struct my_type, my_link) */ -extern void avl_create(avl_tree_t *tree, +_AVL_H void avl_create(avl_tree_t *tree, int (*compar) (const void *, const void *), size_t size, size_t offset); @@ -172,7 +172,7 @@ extern void avl_create(avl_tree_t *tree, * node - node that has the value being looked for * where - position for use with avl_nearest() or avl_insert(), may be NULL */ -extern void *avl_find(avl_tree_t *tree, const void *node, avl_index_t *where); +_AVL_H void *avl_find(avl_tree_t *tree, const void *node, avl_index_t *where); /* * Insert a node into the tree. @@ -180,7 +180,7 @@ extern void *avl_find(avl_tree_t *tree, const void *node, avl_index_t *where); * node - the node to insert * where - position as returned from avl_find() */ -extern void avl_insert(avl_tree_t *tree, void *node, avl_index_t where); +_AVL_H void avl_insert(avl_tree_t *tree, void *node, avl_index_t where); /* * Insert "new_data" in "tree" in the given "direction" either after @@ -193,7 +193,7 @@ extern void avl_insert(avl_tree_t *tree, void *node, avl_index_t where); * here - existing node in "tree" * direction - either AVL_AFTER or AVL_BEFORE the data "here". */ -extern void avl_insert_here(avl_tree_t *tree, void *new_data, void *here, +_AVL_H void avl_insert_here(avl_tree_t *tree, void *new_data, void *here, int direction); @@ -202,8 +202,8 @@ extern void avl_insert_here(avl_tree_t *tree, void *new_data, void *here, * if the tree is empty. * */ -extern void *avl_first(avl_tree_t *tree); -extern void *avl_last(avl_tree_t *tree); +_AVL_H void *avl_first(avl_tree_t *tree); +_AVL_H void *avl_last(avl_tree_t *tree); /* @@ -239,7 +239,7 @@ extern void *avl_last(avl_tree_t *tree); * else * less = avl_nearest(tree, where, AVL_BEFORE); */ -extern void *avl_nearest(avl_tree_t *tree, avl_index_t where, int direction); +_AVL_H void *avl_nearest(avl_tree_t *tree, avl_index_t where, int direction); /* @@ -249,7 +249,7 @@ extern void *avl_nearest(avl_tree_t *tree, avl_index_t where, int direction); * * node - the node to add */ -extern void avl_add(avl_tree_t *tree, void *node); +_AVL_H void avl_add(avl_tree_t *tree, void *node); /* @@ -257,7 +257,7 @@ extern void avl_add(avl_tree_t *tree, void *node); * * node - the node to remove */ -extern void avl_remove(avl_tree_t *tree, void *node); +_AVL_H void avl_remove(avl_tree_t *tree, void *node); /* * Reinsert a node only if its order has changed relative to its nearest @@ -266,24 +266,24 @@ extern void avl_remove(avl_tree_t *tree, void *node); * avl_update_gt() only if you know the direction in which the order of the * node may change. */ -extern boolean_t avl_update(avl_tree_t *, void *); -extern boolean_t avl_update_lt(avl_tree_t *, void *); -extern boolean_t avl_update_gt(avl_tree_t *, void *); +_AVL_H boolean_t avl_update(avl_tree_t *, void *); +_AVL_H boolean_t avl_update_lt(avl_tree_t *, void *); +_AVL_H boolean_t avl_update_gt(avl_tree_t *, void *); /* * Swaps the contents of the two trees. */ -extern void avl_swap(avl_tree_t *tree1, avl_tree_t *tree2); +_AVL_H void avl_swap(avl_tree_t *tree1, avl_tree_t *tree2); /* * Return the number of nodes in the tree */ -extern ulong_t avl_numnodes(avl_tree_t *tree); +_AVL_H ulong_t avl_numnodes(avl_tree_t *tree); /* * Return B_TRUE if there are zero nodes in the tree, B_FALSE otherwise. */ -extern boolean_t avl_is_empty(avl_tree_t *tree); +_AVL_H boolean_t avl_is_empty(avl_tree_t *tree); /* * Used to destroy any remaining nodes in a tree. The cookie argument should @@ -306,7 +306,7 @@ extern boolean_t avl_is_empty(avl_tree_t *tree); * free(node); * avl_destroy(tree); */ -extern void *avl_destroy_nodes(avl_tree_t *tree, void **cookie); +_AVL_H void *avl_destroy_nodes(avl_tree_t *tree, void **cookie); /* @@ -314,7 +314,7 @@ extern void *avl_destroy_nodes(avl_tree_t *tree, void **cookie); * * tree - the empty tree to destroy */ -extern void avl_destroy(avl_tree_t *tree); +_AVL_H void avl_destroy(avl_tree_t *tree); diff --git a/include/sys/avl_impl.h b/include/sys/avl_impl.h index fddf76906..f577ecd42 100644 --- a/include/sys/avl_impl.h +++ b/include/sys/avl_impl.h @@ -25,8 +25,7 @@ */ #ifndef _AVL_IMPL_H -#define _AVL_IMPL_H - +#define _AVL_IMPL_H extern __attribute__((visibility("default"))) /* @@ -155,7 +154,7 @@ struct avl_tree { /* * This will only by used via AVL_NEXT() or AVL_PREV() */ -extern void *avl_walk(struct avl_tree *, void *, int); +_AVL_IMPL_H void *avl_walk(struct avl_tree *, void *, int); #ifdef __cplusplus } diff --git a/include/sys/efi_partition.h b/include/sys/efi_partition.h index fbb58013e..cda2c98e5 100644 --- a/include/sys/efi_partition.h +++ b/include/sys/efi_partition.h @@ -24,7 +24,7 @@ */ #ifndef _SYS_EFI_PARTITION_H -#define _SYS_EFI_PARTITION_H +#define _SYS_EFI_PARTITION_H extern __attribute__((visibility("default"))) #include @@ -363,14 +363,15 @@ struct partition64 { #endif #ifndef _KERNEL -extern int efi_alloc_and_init(int, uint32_t, struct dk_gpt **); -extern int efi_alloc_and_read(int, struct dk_gpt **); -extern int efi_write(int, struct dk_gpt *); -extern int efi_rescan(int); -extern void efi_free(struct dk_gpt *); -extern int efi_type(int); -extern void efi_err_check(struct dk_gpt *); -extern int efi_use_whole_disk(int fd); +_SYS_EFI_PARTITION_H int efi_debug; +_SYS_EFI_PARTITION_H int efi_alloc_and_init(int, uint32_t, struct dk_gpt **); +_SYS_EFI_PARTITION_H int efi_alloc_and_read(int, struct dk_gpt **); +_SYS_EFI_PARTITION_H int efi_write(int, struct dk_gpt *); +_SYS_EFI_PARTITION_H int efi_rescan(int); +_SYS_EFI_PARTITION_H void efi_free(struct dk_gpt *); +_SYS_EFI_PARTITION_H int efi_type(int); +_SYS_EFI_PARTITION_H void efi_err_check(struct dk_gpt *); +_SYS_EFI_PARTITION_H int efi_use_whole_disk(int fd); #endif #ifdef __cplusplus diff --git a/include/sys/nvpair.h b/include/sys/nvpair.h index b0be8bd7a..76d383a3c 100644 --- a/include/sys/nvpair.h +++ b/include/sys/nvpair.h @@ -24,7 +24,7 @@ */ #ifndef _SYS_NVPAIR_H -#define _SYS_NVPAIR_H +#define _SYS_NVPAIR_H extern __attribute__((visibility("default"))) #include #include @@ -135,221 +135,270 @@ struct nv_alloc_ops { void (*nv_ao_reset)(nv_alloc_t *); }; -extern const nv_alloc_ops_t *nv_fixed_ops; -extern nv_alloc_t *nv_alloc_nosleep; +_SYS_NVPAIR_H const nv_alloc_ops_t *nv_fixed_ops; +_SYS_NVPAIR_H nv_alloc_t *nv_alloc_nosleep; #if defined(_KERNEL) -extern nv_alloc_t *nv_alloc_sleep; -extern nv_alloc_t *nv_alloc_pushpage; +_SYS_NVPAIR_H nv_alloc_t *nv_alloc_sleep; +_SYS_NVPAIR_H nv_alloc_t *nv_alloc_pushpage; #endif -int nv_alloc_init(nv_alloc_t *, const nv_alloc_ops_t *, /* args */ ...); -void nv_alloc_reset(nv_alloc_t *); -void nv_alloc_fini(nv_alloc_t *); +_SYS_NVPAIR_H int nv_alloc_init(nv_alloc_t *, const nv_alloc_ops_t *, + /* args */ ...); +_SYS_NVPAIR_H void nv_alloc_reset(nv_alloc_t *); +_SYS_NVPAIR_H void nv_alloc_fini(nv_alloc_t *); /* list management */ -int nvlist_alloc(nvlist_t **, uint_t, int); -void nvlist_free(nvlist_t *); -int nvlist_size(nvlist_t *, size_t *, int); -int nvlist_pack(nvlist_t *, char **, size_t *, int, int); -int nvlist_unpack(char *, size_t, nvlist_t **, int); -int nvlist_dup(nvlist_t *, nvlist_t **, int); -int nvlist_merge(nvlist_t *, nvlist_t *, int); +_SYS_NVPAIR_H int nvlist_alloc(nvlist_t **, uint_t, int); +_SYS_NVPAIR_H void nvlist_free(nvlist_t *); +_SYS_NVPAIR_H int nvlist_size(nvlist_t *, size_t *, int); +_SYS_NVPAIR_H int nvlist_pack(nvlist_t *, char **, size_t *, int, int); +_SYS_NVPAIR_H int nvlist_unpack(char *, size_t, nvlist_t **, int); +_SYS_NVPAIR_H int nvlist_dup(nvlist_t *, nvlist_t **, int); +_SYS_NVPAIR_H int nvlist_merge(nvlist_t *, nvlist_t *, int); -uint_t nvlist_nvflag(nvlist_t *); +_SYS_NVPAIR_H uint_t nvlist_nvflag(nvlist_t *); -int nvlist_xalloc(nvlist_t **, uint_t, nv_alloc_t *); -int nvlist_xpack(nvlist_t *, char **, size_t *, int, nv_alloc_t *); -int nvlist_xunpack(char *, size_t, nvlist_t **, nv_alloc_t *); -int nvlist_xdup(nvlist_t *, nvlist_t **, nv_alloc_t *); -nv_alloc_t *nvlist_lookup_nv_alloc(nvlist_t *); +_SYS_NVPAIR_H int nvlist_xalloc(nvlist_t **, uint_t, nv_alloc_t *); +_SYS_NVPAIR_H int nvlist_xpack(nvlist_t *, char **, size_t *, int, + nv_alloc_t *); +_SYS_NVPAIR_H int nvlist_xunpack(char *, size_t, nvlist_t **, nv_alloc_t *); +_SYS_NVPAIR_H int nvlist_xdup(nvlist_t *, nvlist_t **, nv_alloc_t *); +_SYS_NVPAIR_H nv_alloc_t *nvlist_lookup_nv_alloc(nvlist_t *); -int nvlist_add_nvpair(nvlist_t *, nvpair_t *); -int nvlist_add_boolean(nvlist_t *, const char *); -int nvlist_add_boolean_value(nvlist_t *, const char *, boolean_t); -int nvlist_add_byte(nvlist_t *, const char *, uchar_t); -int nvlist_add_int8(nvlist_t *, const char *, int8_t); -int nvlist_add_uint8(nvlist_t *, const char *, uint8_t); -int nvlist_add_int16(nvlist_t *, const char *, int16_t); -int nvlist_add_uint16(nvlist_t *, const char *, uint16_t); -int nvlist_add_int32(nvlist_t *, const char *, int32_t); -int nvlist_add_uint32(nvlist_t *, const char *, uint32_t); -int nvlist_add_int64(nvlist_t *, const char *, int64_t); -int nvlist_add_uint64(nvlist_t *, const char *, uint64_t); -int nvlist_add_string(nvlist_t *, const char *, const char *); -int nvlist_add_nvlist(nvlist_t *, const char *, nvlist_t *); -int nvlist_add_boolean_array(nvlist_t *, const char *, boolean_t *, uint_t); -int nvlist_add_byte_array(nvlist_t *, const char *, uchar_t *, uint_t); -int nvlist_add_int8_array(nvlist_t *, const char *, int8_t *, uint_t); -int nvlist_add_uint8_array(nvlist_t *, const char *, uint8_t *, uint_t); -int nvlist_add_int16_array(nvlist_t *, const char *, int16_t *, uint_t); -int nvlist_add_uint16_array(nvlist_t *, const char *, uint16_t *, uint_t); -int nvlist_add_int32_array(nvlist_t *, const char *, int32_t *, uint_t); -int nvlist_add_uint32_array(nvlist_t *, const char *, uint32_t *, uint_t); -int nvlist_add_int64_array(nvlist_t *, const char *, int64_t *, uint_t); -int nvlist_add_uint64_array(nvlist_t *, const char *, uint64_t *, uint_t); -int nvlist_add_string_array(nvlist_t *, const char *, char *const *, uint_t); -int nvlist_add_nvlist_array(nvlist_t *, const char *, nvlist_t **, uint_t); -int nvlist_add_hrtime(nvlist_t *, const char *, hrtime_t); +_SYS_NVPAIR_H int nvlist_add_nvpair(nvlist_t *, nvpair_t *); +_SYS_NVPAIR_H int nvlist_add_boolean(nvlist_t *, const char *); +_SYS_NVPAIR_H int nvlist_add_boolean_value(nvlist_t *, const char *, boolean_t); +_SYS_NVPAIR_H int nvlist_add_byte(nvlist_t *, const char *, uchar_t); +_SYS_NVPAIR_H int nvlist_add_int8(nvlist_t *, const char *, int8_t); +_SYS_NVPAIR_H int nvlist_add_uint8(nvlist_t *, const char *, uint8_t); +_SYS_NVPAIR_H int nvlist_add_int16(nvlist_t *, const char *, int16_t); +_SYS_NVPAIR_H int nvlist_add_uint16(nvlist_t *, const char *, uint16_t); +_SYS_NVPAIR_H int nvlist_add_int32(nvlist_t *, const char *, int32_t); +_SYS_NVPAIR_H int nvlist_add_uint32(nvlist_t *, const char *, uint32_t); +_SYS_NVPAIR_H int nvlist_add_int64(nvlist_t *, const char *, int64_t); +_SYS_NVPAIR_H int nvlist_add_uint64(nvlist_t *, const char *, uint64_t); +_SYS_NVPAIR_H int nvlist_add_string(nvlist_t *, const char *, const char *); +_SYS_NVPAIR_H int nvlist_add_nvlist(nvlist_t *, const char *, nvlist_t *); +_SYS_NVPAIR_H int nvlist_add_boolean_array(nvlist_t *, const char *, + boolean_t *, uint_t); +_SYS_NVPAIR_H int nvlist_add_byte_array(nvlist_t *, const char *, uchar_t *, + uint_t); +_SYS_NVPAIR_H int nvlist_add_int8_array(nvlist_t *, const char *, int8_t *, + uint_t); +_SYS_NVPAIR_H int nvlist_add_uint8_array(nvlist_t *, const char *, uint8_t *, + uint_t); +_SYS_NVPAIR_H int nvlist_add_int16_array(nvlist_t *, const char *, int16_t *, + uint_t); +_SYS_NVPAIR_H int nvlist_add_uint16_array(nvlist_t *, const char *, uint16_t *, + uint_t); +_SYS_NVPAIR_H int nvlist_add_int32_array(nvlist_t *, const char *, int32_t *, + uint_t); +_SYS_NVPAIR_H int nvlist_add_uint32_array(nvlist_t *, const char *, uint32_t *, + uint_t); +_SYS_NVPAIR_H int nvlist_add_int64_array(nvlist_t *, const char *, int64_t *, + uint_t); +_SYS_NVPAIR_H int nvlist_add_uint64_array(nvlist_t *, const char *, uint64_t *, + uint_t); +_SYS_NVPAIR_H int nvlist_add_string_array(nvlist_t *, const char *, + char * const *, uint_t); +_SYS_NVPAIR_H int nvlist_add_nvlist_array(nvlist_t *, const char *, + nvlist_t **, uint_t); +_SYS_NVPAIR_H int nvlist_add_hrtime(nvlist_t *, const char *, hrtime_t); #if !defined(_KERNEL) && !defined(_STANDALONE) -int nvlist_add_double(nvlist_t *, const char *, double); +_SYS_NVPAIR_H int nvlist_add_double(nvlist_t *, const char *, double); #endif -int nvlist_remove(nvlist_t *, const char *, data_type_t); -int nvlist_remove_all(nvlist_t *, const char *); -int nvlist_remove_nvpair(nvlist_t *, nvpair_t *); +_SYS_NVPAIR_H int nvlist_remove(nvlist_t *, const char *, data_type_t); +_SYS_NVPAIR_H int nvlist_remove_all(nvlist_t *, const char *); +_SYS_NVPAIR_H int nvlist_remove_nvpair(nvlist_t *, nvpair_t *); -int nvlist_lookup_boolean(nvlist_t *, const char *); -int nvlist_lookup_boolean_value(nvlist_t *, const char *, boolean_t *); -int nvlist_lookup_byte(nvlist_t *, const char *, uchar_t *); -int nvlist_lookup_int8(nvlist_t *, const char *, int8_t *); -int nvlist_lookup_uint8(nvlist_t *, const char *, uint8_t *); -int nvlist_lookup_int16(nvlist_t *, const char *, int16_t *); -int nvlist_lookup_uint16(nvlist_t *, const char *, uint16_t *); -int nvlist_lookup_int32(nvlist_t *, const char *, int32_t *); -int nvlist_lookup_uint32(nvlist_t *, const char *, uint32_t *); -int nvlist_lookup_int64(nvlist_t *, const char *, int64_t *); -int nvlist_lookup_uint64(nvlist_t *, const char *, uint64_t *); -int nvlist_lookup_string(nvlist_t *, const char *, char **); -int nvlist_lookup_nvlist(nvlist_t *, const char *, nvlist_t **); -int nvlist_lookup_boolean_array(nvlist_t *, const char *, +_SYS_NVPAIR_H int nvlist_lookup_boolean(nvlist_t *, const char *); +_SYS_NVPAIR_H int nvlist_lookup_boolean_value(nvlist_t *, const char *, + boolean_t *); +_SYS_NVPAIR_H int nvlist_lookup_byte(nvlist_t *, const char *, uchar_t *); +_SYS_NVPAIR_H int nvlist_lookup_int8(nvlist_t *, const char *, int8_t *); +_SYS_NVPAIR_H int nvlist_lookup_uint8(nvlist_t *, const char *, uint8_t *); +_SYS_NVPAIR_H int nvlist_lookup_int16(nvlist_t *, const char *, int16_t *); +_SYS_NVPAIR_H int nvlist_lookup_uint16(nvlist_t *, const char *, uint16_t *); +_SYS_NVPAIR_H int nvlist_lookup_int32(nvlist_t *, const char *, int32_t *); +_SYS_NVPAIR_H int nvlist_lookup_uint32(nvlist_t *, const char *, uint32_t *); +_SYS_NVPAIR_H int nvlist_lookup_int64(nvlist_t *, const char *, int64_t *); +_SYS_NVPAIR_H int nvlist_lookup_uint64(nvlist_t *, const char *, uint64_t *); +_SYS_NVPAIR_H int nvlist_lookup_string(nvlist_t *, const char *, char **); +_SYS_NVPAIR_H int nvlist_lookup_nvlist(nvlist_t *, const char *, nvlist_t **); +_SYS_NVPAIR_H int nvlist_lookup_boolean_array(nvlist_t *, const char *, boolean_t **, uint_t *); -int nvlist_lookup_byte_array(nvlist_t *, const char *, uchar_t **, uint_t *); -int nvlist_lookup_int8_array(nvlist_t *, const char *, int8_t **, uint_t *); -int nvlist_lookup_uint8_array(nvlist_t *, const char *, uint8_t **, uint_t *); -int nvlist_lookup_int16_array(nvlist_t *, const char *, int16_t **, uint_t *); -int nvlist_lookup_uint16_array(nvlist_t *, const char *, uint16_t **, uint_t *); -int nvlist_lookup_int32_array(nvlist_t *, const char *, int32_t **, uint_t *); -int nvlist_lookup_uint32_array(nvlist_t *, const char *, uint32_t **, uint_t *); -int nvlist_lookup_int64_array(nvlist_t *, const char *, int64_t **, uint_t *); -int nvlist_lookup_uint64_array(nvlist_t *, const char *, uint64_t **, uint_t *); -int nvlist_lookup_string_array(nvlist_t *, const char *, char ***, uint_t *); -int nvlist_lookup_nvlist_array(nvlist_t *, const char *, +_SYS_NVPAIR_H int nvlist_lookup_byte_array(nvlist_t *, const char *, uchar_t **, + uint_t *); +_SYS_NVPAIR_H int nvlist_lookup_int8_array(nvlist_t *, const char *, int8_t **, + uint_t *); +_SYS_NVPAIR_H int nvlist_lookup_uint8_array(nvlist_t *, const char *, + uint8_t **, uint_t *); +_SYS_NVPAIR_H int nvlist_lookup_int16_array(nvlist_t *, const char *, + int16_t **, uint_t *); +_SYS_NVPAIR_H int nvlist_lookup_uint16_array(nvlist_t *, const char *, + uint16_t **, uint_t *); +_SYS_NVPAIR_H int nvlist_lookup_int32_array(nvlist_t *, const char *, + int32_t **, uint_t *); +_SYS_NVPAIR_H int nvlist_lookup_uint32_array(nvlist_t *, const char *, + uint32_t **, uint_t *); +_SYS_NVPAIR_H int nvlist_lookup_int64_array(nvlist_t *, const char *, + int64_t **, uint_t *); +_SYS_NVPAIR_H int nvlist_lookup_uint64_array(nvlist_t *, const char *, + uint64_t **, uint_t *); +_SYS_NVPAIR_H int nvlist_lookup_string_array(nvlist_t *, const char *, + char ***, uint_t *); +_SYS_NVPAIR_H int nvlist_lookup_nvlist_array(nvlist_t *, const char *, nvlist_t ***, uint_t *); -int nvlist_lookup_hrtime(nvlist_t *, const char *, hrtime_t *); -int nvlist_lookup_pairs(nvlist_t *, int, ...); +_SYS_NVPAIR_H int nvlist_lookup_hrtime(nvlist_t *, const char *, hrtime_t *); +_SYS_NVPAIR_H int nvlist_lookup_pairs(nvlist_t *, int, ...); #if !defined(_KERNEL) && !defined(_STANDALONE) -int nvlist_lookup_double(nvlist_t *, const char *, double *); +_SYS_NVPAIR_H int nvlist_lookup_double(nvlist_t *, const char *, double *); #endif -int nvlist_lookup_nvpair(nvlist_t *, const char *, nvpair_t **); -int nvlist_lookup_nvpair_embedded_index(nvlist_t *, const char *, nvpair_t **, - int *, char **); -boolean_t nvlist_exists(nvlist_t *, const char *); -boolean_t nvlist_empty(nvlist_t *); +_SYS_NVPAIR_H int nvlist_lookup_nvpair(nvlist_t *, const char *, nvpair_t **); +_SYS_NVPAIR_H int nvlist_lookup_nvpair_embedded_index(nvlist_t *, const char *, + nvpair_t **, int *, char **); +_SYS_NVPAIR_H boolean_t nvlist_exists(nvlist_t *, const char *); +_SYS_NVPAIR_H boolean_t nvlist_empty(nvlist_t *); /* processing nvpair */ -nvpair_t *nvlist_next_nvpair(nvlist_t *, nvpair_t *); -nvpair_t *nvlist_prev_nvpair(nvlist_t *, nvpair_t *); -char *nvpair_name(nvpair_t *); -data_type_t nvpair_type(nvpair_t *); -int nvpair_type_is_array(nvpair_t *); -int nvpair_value_boolean_value(nvpair_t *, boolean_t *); -int nvpair_value_byte(nvpair_t *, uchar_t *); -int nvpair_value_int8(nvpair_t *, int8_t *); -int nvpair_value_uint8(nvpair_t *, uint8_t *); -int nvpair_value_int16(nvpair_t *, int16_t *); -int nvpair_value_uint16(nvpair_t *, uint16_t *); -int nvpair_value_int32(nvpair_t *, int32_t *); -int nvpair_value_uint32(nvpair_t *, uint32_t *); -int nvpair_value_int64(nvpair_t *, int64_t *); -int nvpair_value_uint64(nvpair_t *, uint64_t *); -int nvpair_value_string(nvpair_t *, char **); -int nvpair_value_nvlist(nvpair_t *, nvlist_t **); -int nvpair_value_boolean_array(nvpair_t *, boolean_t **, uint_t *); -int nvpair_value_byte_array(nvpair_t *, uchar_t **, uint_t *); -int nvpair_value_int8_array(nvpair_t *, int8_t **, uint_t *); -int nvpair_value_uint8_array(nvpair_t *, uint8_t **, uint_t *); -int nvpair_value_int16_array(nvpair_t *, int16_t **, uint_t *); -int nvpair_value_uint16_array(nvpair_t *, uint16_t **, uint_t *); -int nvpair_value_int32_array(nvpair_t *, int32_t **, uint_t *); -int nvpair_value_uint32_array(nvpair_t *, uint32_t **, uint_t *); -int nvpair_value_int64_array(nvpair_t *, int64_t **, uint_t *); -int nvpair_value_uint64_array(nvpair_t *, uint64_t **, uint_t *); -int nvpair_value_string_array(nvpair_t *, char ***, uint_t *); -int nvpair_value_nvlist_array(nvpair_t *, nvlist_t ***, uint_t *); -int nvpair_value_hrtime(nvpair_t *, hrtime_t *); +_SYS_NVPAIR_H nvpair_t *nvlist_next_nvpair(nvlist_t *, nvpair_t *); +_SYS_NVPAIR_H nvpair_t *nvlist_prev_nvpair(nvlist_t *, nvpair_t *); +_SYS_NVPAIR_H char *nvpair_name(nvpair_t *); +_SYS_NVPAIR_H data_type_t nvpair_type(nvpair_t *); +_SYS_NVPAIR_H int nvpair_type_is_array(nvpair_t *); +_SYS_NVPAIR_H int nvpair_value_boolean_value(nvpair_t *, boolean_t *); +_SYS_NVPAIR_H int nvpair_value_byte(nvpair_t *, uchar_t *); +_SYS_NVPAIR_H int nvpair_value_int8(nvpair_t *, int8_t *); +_SYS_NVPAIR_H int nvpair_value_uint8(nvpair_t *, uint8_t *); +_SYS_NVPAIR_H int nvpair_value_int16(nvpair_t *, int16_t *); +_SYS_NVPAIR_H int nvpair_value_uint16(nvpair_t *, uint16_t *); +_SYS_NVPAIR_H int nvpair_value_int32(nvpair_t *, int32_t *); +_SYS_NVPAIR_H int nvpair_value_uint32(nvpair_t *, uint32_t *); +_SYS_NVPAIR_H int nvpair_value_int64(nvpair_t *, int64_t *); +_SYS_NVPAIR_H int nvpair_value_uint64(nvpair_t *, uint64_t *); +_SYS_NVPAIR_H int nvpair_value_string(nvpair_t *, char **); +_SYS_NVPAIR_H int nvpair_value_nvlist(nvpair_t *, nvlist_t **); +_SYS_NVPAIR_H int nvpair_value_boolean_array(nvpair_t *, boolean_t **, + uint_t *); +_SYS_NVPAIR_H int nvpair_value_byte_array(nvpair_t *, uchar_t **, uint_t *); +_SYS_NVPAIR_H int nvpair_value_int8_array(nvpair_t *, int8_t **, uint_t *); +_SYS_NVPAIR_H int nvpair_value_uint8_array(nvpair_t *, uint8_t **, uint_t *); +_SYS_NVPAIR_H int nvpair_value_int16_array(nvpair_t *, int16_t **, uint_t *); +_SYS_NVPAIR_H int nvpair_value_uint16_array(nvpair_t *, uint16_t **, uint_t *); +_SYS_NVPAIR_H int nvpair_value_int32_array(nvpair_t *, int32_t **, uint_t *); +_SYS_NVPAIR_H int nvpair_value_uint32_array(nvpair_t *, uint32_t **, uint_t *); +_SYS_NVPAIR_H int nvpair_value_int64_array(nvpair_t *, int64_t **, uint_t *); +_SYS_NVPAIR_H int nvpair_value_uint64_array(nvpair_t *, uint64_t **, uint_t *); +_SYS_NVPAIR_H int nvpair_value_string_array(nvpair_t *, char ***, uint_t *); +_SYS_NVPAIR_H int nvpair_value_nvlist_array(nvpair_t *, nvlist_t ***, uint_t *); +_SYS_NVPAIR_H int nvpair_value_hrtime(nvpair_t *, hrtime_t *); #if !defined(_KERNEL) && !defined(_STANDALONE) -int nvpair_value_double(nvpair_t *, double *); +_SYS_NVPAIR_H int nvpair_value_double(nvpair_t *, double *); #endif -nvlist_t *fnvlist_alloc(void); -void fnvlist_free(nvlist_t *); -size_t fnvlist_size(nvlist_t *); -char *fnvlist_pack(nvlist_t *, size_t *); -void fnvlist_pack_free(char *, size_t); -nvlist_t *fnvlist_unpack(char *, size_t); -nvlist_t *fnvlist_dup(nvlist_t *); -void fnvlist_merge(nvlist_t *, nvlist_t *); -size_t fnvlist_num_pairs(nvlist_t *); +_SYS_NVPAIR_H nvlist_t *fnvlist_alloc(void); +_SYS_NVPAIR_H void fnvlist_free(nvlist_t *); +_SYS_NVPAIR_H size_t fnvlist_size(nvlist_t *); +_SYS_NVPAIR_H char *fnvlist_pack(nvlist_t *, size_t *); +_SYS_NVPAIR_H void fnvlist_pack_free(char *, size_t); +_SYS_NVPAIR_H nvlist_t *fnvlist_unpack(char *, size_t); +_SYS_NVPAIR_H nvlist_t *fnvlist_dup(nvlist_t *); +_SYS_NVPAIR_H void fnvlist_merge(nvlist_t *, nvlist_t *); +_SYS_NVPAIR_H size_t fnvlist_num_pairs(nvlist_t *); -void fnvlist_add_boolean(nvlist_t *, const char *); -void fnvlist_add_boolean_value(nvlist_t *, const char *, boolean_t); -void fnvlist_add_byte(nvlist_t *, const char *, uchar_t); -void fnvlist_add_int8(nvlist_t *, const char *, int8_t); -void fnvlist_add_uint8(nvlist_t *, const char *, uint8_t); -void fnvlist_add_int16(nvlist_t *, const char *, int16_t); -void fnvlist_add_uint16(nvlist_t *, const char *, uint16_t); -void fnvlist_add_int32(nvlist_t *, const char *, int32_t); -void fnvlist_add_uint32(nvlist_t *, const char *, uint32_t); -void fnvlist_add_int64(nvlist_t *, const char *, int64_t); -void fnvlist_add_uint64(nvlist_t *, const char *, uint64_t); -void fnvlist_add_string(nvlist_t *, const char *, const char *); -void fnvlist_add_nvlist(nvlist_t *, const char *, nvlist_t *); -void fnvlist_add_nvpair(nvlist_t *, nvpair_t *); -void fnvlist_add_boolean_array(nvlist_t *, const char *, boolean_t *, uint_t); -void fnvlist_add_byte_array(nvlist_t *, const char *, uchar_t *, uint_t); -void fnvlist_add_int8_array(nvlist_t *, const char *, int8_t *, uint_t); -void fnvlist_add_uint8_array(nvlist_t *, const char *, uint8_t *, uint_t); -void fnvlist_add_int16_array(nvlist_t *, const char *, int16_t *, uint_t); -void fnvlist_add_uint16_array(nvlist_t *, const char *, uint16_t *, uint_t); -void fnvlist_add_int32_array(nvlist_t *, const char *, int32_t *, uint_t); -void fnvlist_add_uint32_array(nvlist_t *, const char *, uint32_t *, uint_t); -void fnvlist_add_int64_array(nvlist_t *, const char *, int64_t *, uint_t); -void fnvlist_add_uint64_array(nvlist_t *, const char *, uint64_t *, uint_t); -void fnvlist_add_string_array(nvlist_t *, const char *, char * const *, uint_t); -void fnvlist_add_nvlist_array(nvlist_t *, const char *, nvlist_t **, uint_t); +_SYS_NVPAIR_H void fnvlist_add_boolean(nvlist_t *, const char *); +_SYS_NVPAIR_H void fnvlist_add_boolean_value(nvlist_t *, const char *, + boolean_t); +_SYS_NVPAIR_H void fnvlist_add_byte(nvlist_t *, const char *, uchar_t); +_SYS_NVPAIR_H void fnvlist_add_int8(nvlist_t *, const char *, int8_t); +_SYS_NVPAIR_H void fnvlist_add_uint8(nvlist_t *, const char *, uint8_t); +_SYS_NVPAIR_H void fnvlist_add_int16(nvlist_t *, const char *, int16_t); +_SYS_NVPAIR_H void fnvlist_add_uint16(nvlist_t *, const char *, uint16_t); +_SYS_NVPAIR_H void fnvlist_add_int32(nvlist_t *, const char *, int32_t); +_SYS_NVPAIR_H void fnvlist_add_uint32(nvlist_t *, const char *, uint32_t); +_SYS_NVPAIR_H void fnvlist_add_int64(nvlist_t *, const char *, int64_t); +_SYS_NVPAIR_H void fnvlist_add_uint64(nvlist_t *, const char *, uint64_t); +_SYS_NVPAIR_H void fnvlist_add_string(nvlist_t *, const char *, const char *); +_SYS_NVPAIR_H void fnvlist_add_nvlist(nvlist_t *, const char *, nvlist_t *); +_SYS_NVPAIR_H void fnvlist_add_nvpair(nvlist_t *, nvpair_t *); +_SYS_NVPAIR_H void fnvlist_add_boolean_array(nvlist_t *, const char *, + boolean_t *, uint_t); +_SYS_NVPAIR_H void fnvlist_add_byte_array(nvlist_t *, const char *, uchar_t *, + uint_t); +_SYS_NVPAIR_H void fnvlist_add_int8_array(nvlist_t *, const char *, int8_t *, + uint_t); +_SYS_NVPAIR_H void fnvlist_add_uint8_array(nvlist_t *, const char *, uint8_t *, + uint_t); +_SYS_NVPAIR_H void fnvlist_add_int16_array(nvlist_t *, const char *, int16_t *, + uint_t); +_SYS_NVPAIR_H void fnvlist_add_uint16_array(nvlist_t *, const char *, + uint16_t *, uint_t); +_SYS_NVPAIR_H void fnvlist_add_int32_array(nvlist_t *, const char *, int32_t *, + uint_t); +_SYS_NVPAIR_H void fnvlist_add_uint32_array(nvlist_t *, const char *, + uint32_t *, uint_t); +_SYS_NVPAIR_H void fnvlist_add_int64_array(nvlist_t *, const char *, int64_t *, + uint_t); +_SYS_NVPAIR_H void fnvlist_add_uint64_array(nvlist_t *, const char *, + uint64_t *, uint_t); +_SYS_NVPAIR_H void fnvlist_add_string_array(nvlist_t *, const char *, + char * const *, uint_t); +_SYS_NVPAIR_H void fnvlist_add_nvlist_array(nvlist_t *, const char *, + nvlist_t **, uint_t); -void fnvlist_remove(nvlist_t *, const char *); -void fnvlist_remove_nvpair(nvlist_t *, nvpair_t *); +_SYS_NVPAIR_H void fnvlist_remove(nvlist_t *, const char *); +_SYS_NVPAIR_H void fnvlist_remove_nvpair(nvlist_t *, nvpair_t *); -nvpair_t *fnvlist_lookup_nvpair(nvlist_t *, const char *); -boolean_t fnvlist_lookup_boolean(nvlist_t *, const char *); -boolean_t fnvlist_lookup_boolean_value(nvlist_t *, const char *); -uchar_t fnvlist_lookup_byte(nvlist_t *, const char *); -int8_t fnvlist_lookup_int8(nvlist_t *, const char *); -int16_t fnvlist_lookup_int16(nvlist_t *, const char *); -int32_t fnvlist_lookup_int32(nvlist_t *, const char *); -int64_t fnvlist_lookup_int64(nvlist_t *, const char *); -uint8_t fnvlist_lookup_uint8(nvlist_t *, const char *); -uint16_t fnvlist_lookup_uint16(nvlist_t *, const char *); -uint32_t fnvlist_lookup_uint32(nvlist_t *, const char *); -uint64_t fnvlist_lookup_uint64(nvlist_t *, const char *); -char *fnvlist_lookup_string(nvlist_t *, const char *); -nvlist_t *fnvlist_lookup_nvlist(nvlist_t *, const char *); -boolean_t *fnvlist_lookup_boolean_array(nvlist_t *, const char *, uint_t *); -uchar_t *fnvlist_lookup_byte_array(nvlist_t *, const char *, uint_t *); -int8_t *fnvlist_lookup_int8_array(nvlist_t *, const char *, uint_t *); -uint8_t *fnvlist_lookup_uint8_array(nvlist_t *, const char *, uint_t *); -int16_t *fnvlist_lookup_int16_array(nvlist_t *, const char *, uint_t *); -uint16_t *fnvlist_lookup_uint16_array(nvlist_t *, const char *, uint_t *); -int32_t *fnvlist_lookup_int32_array(nvlist_t *, const char *, uint_t *); -uint32_t *fnvlist_lookup_uint32_array(nvlist_t *, const char *, uint_t *); -int64_t *fnvlist_lookup_int64_array(nvlist_t *, const char *, uint_t *); -uint64_t *fnvlist_lookup_uint64_array(nvlist_t *, const char *, uint_t *); +_SYS_NVPAIR_H nvpair_t *fnvlist_lookup_nvpair(nvlist_t *, const char *); +_SYS_NVPAIR_H boolean_t fnvlist_lookup_boolean(nvlist_t *, const char *); +_SYS_NVPAIR_H boolean_t fnvlist_lookup_boolean_value(nvlist_t *, const char *); +_SYS_NVPAIR_H uchar_t fnvlist_lookup_byte(nvlist_t *, const char *); +_SYS_NVPAIR_H int8_t fnvlist_lookup_int8(nvlist_t *, const char *); +_SYS_NVPAIR_H int16_t fnvlist_lookup_int16(nvlist_t *, const char *); +_SYS_NVPAIR_H int32_t fnvlist_lookup_int32(nvlist_t *, const char *); +_SYS_NVPAIR_H int64_t fnvlist_lookup_int64(nvlist_t *, const char *); +_SYS_NVPAIR_H uint8_t fnvlist_lookup_uint8(nvlist_t *, const char *); +_SYS_NVPAIR_H uint16_t fnvlist_lookup_uint16(nvlist_t *, const char *); +_SYS_NVPAIR_H uint32_t fnvlist_lookup_uint32(nvlist_t *, const char *); +_SYS_NVPAIR_H uint64_t fnvlist_lookup_uint64(nvlist_t *, const char *); +_SYS_NVPAIR_H char *fnvlist_lookup_string(nvlist_t *, const char *); +_SYS_NVPAIR_H nvlist_t *fnvlist_lookup_nvlist(nvlist_t *, const char *); +_SYS_NVPAIR_H boolean_t *fnvlist_lookup_boolean_array(nvlist_t *, const char *, + uint_t *); +_SYS_NVPAIR_H uchar_t *fnvlist_lookup_byte_array(nvlist_t *, const char *, + uint_t *); +_SYS_NVPAIR_H int8_t *fnvlist_lookup_int8_array(nvlist_t *, const char *, + uint_t *); +_SYS_NVPAIR_H uint8_t *fnvlist_lookup_uint8_array(nvlist_t *, const char *, + uint_t *); +_SYS_NVPAIR_H int16_t *fnvlist_lookup_int16_array(nvlist_t *, const char *, + uint_t *); +_SYS_NVPAIR_H uint16_t *fnvlist_lookup_uint16_array(nvlist_t *, const char *, + uint_t *); +_SYS_NVPAIR_H int32_t *fnvlist_lookup_int32_array(nvlist_t *, const char *, + uint_t *); +_SYS_NVPAIR_H uint32_t *fnvlist_lookup_uint32_array(nvlist_t *, const char *, + uint_t *); +_SYS_NVPAIR_H int64_t *fnvlist_lookup_int64_array(nvlist_t *, const char *, + uint_t *); +_SYS_NVPAIR_H uint64_t *fnvlist_lookup_uint64_array(nvlist_t *, const char *, + uint_t *); -boolean_t fnvpair_value_boolean_value(nvpair_t *nvp); -uchar_t fnvpair_value_byte(nvpair_t *nvp); -int8_t fnvpair_value_int8(nvpair_t *nvp); -int16_t fnvpair_value_int16(nvpair_t *nvp); -int32_t fnvpair_value_int32(nvpair_t *nvp); -int64_t fnvpair_value_int64(nvpair_t *nvp); -uint8_t fnvpair_value_uint8(nvpair_t *nvp); -uint16_t fnvpair_value_uint16(nvpair_t *nvp); -uint32_t fnvpair_value_uint32(nvpair_t *nvp); -uint64_t fnvpair_value_uint64(nvpair_t *nvp); -char *fnvpair_value_string(nvpair_t *nvp); -nvlist_t *fnvpair_value_nvlist(nvpair_t *nvp); +_SYS_NVPAIR_H boolean_t fnvpair_value_boolean_value(nvpair_t *nvp); +_SYS_NVPAIR_H uchar_t fnvpair_value_byte(nvpair_t *nvp); +_SYS_NVPAIR_H int8_t fnvpair_value_int8(nvpair_t *nvp); +_SYS_NVPAIR_H int16_t fnvpair_value_int16(nvpair_t *nvp); +_SYS_NVPAIR_H int32_t fnvpair_value_int32(nvpair_t *nvp); +_SYS_NVPAIR_H int64_t fnvpair_value_int64(nvpair_t *nvp); +_SYS_NVPAIR_H uint8_t fnvpair_value_uint8(nvpair_t *nvp); +_SYS_NVPAIR_H uint16_t fnvpair_value_uint16(nvpair_t *nvp); +_SYS_NVPAIR_H uint32_t fnvpair_value_uint32(nvpair_t *nvp); +_SYS_NVPAIR_H uint64_t fnvpair_value_uint64(nvpair_t *nvp); +_SYS_NVPAIR_H char *fnvpair_value_string(nvpair_t *nvp); +_SYS_NVPAIR_H nvlist_t *fnvpair_value_nvlist(nvpair_t *nvp); #ifdef __cplusplus } diff --git a/include/thread_pool.h b/include/thread_pool.h index 57266f11c..43090c3c6 100644 --- a/include/thread_pool.h +++ b/include/thread_pool.h @@ -25,7 +25,7 @@ */ #ifndef _THREAD_POOL_H_ -#define _THREAD_POOL_H_ +#define _THREAD_POOL_H_ extern __attribute__((visibility("default"))) #include #include @@ -37,33 +37,17 @@ extern "C" { typedef struct tpool tpool_t; /* opaque thread pool descriptor */ -#if defined(__STDC__) - -extern tpool_t *tpool_create(uint_t min_threads, uint_t max_threads, +_THREAD_POOL_H_ tpool_t *tpool_create(uint_t min_threads, uint_t max_threads, uint_t linger, pthread_attr_t *attr); -extern int tpool_dispatch(tpool_t *tpool, +_THREAD_POOL_H_ int tpool_dispatch(tpool_t *tpool, void (*func)(void *), void *arg); -extern void tpool_destroy(tpool_t *tpool); -extern void tpool_abandon(tpool_t *tpool); -extern void tpool_wait(tpool_t *tpool); -extern void tpool_suspend(tpool_t *tpool); -extern int tpool_suspended(tpool_t *tpool); -extern void tpool_resume(tpool_t *tpool); -extern int tpool_member(tpool_t *tpool); - -#else /* Non ANSI */ - -extern tpool_t *tpool_create(); -extern int tpool_dispatch(); -extern void tpool_destroy(); -extern void tpool_abandon(); -extern void tpool_wait(); -extern void tpool_suspend(); -extern int tpool_suspended(); -extern void tpool_resume(); -extern int tpool_member(); - -#endif /* __STDC__ */ +_THREAD_POOL_H_ void tpool_destroy(tpool_t *tpool); +_THREAD_POOL_H_ void tpool_abandon(tpool_t *tpool); +_THREAD_POOL_H_ void tpool_wait(tpool_t *tpool); +_THREAD_POOL_H_ void tpool_suspend(tpool_t *tpool); +_THREAD_POOL_H_ int tpool_suspended(tpool_t *tpool); +_THREAD_POOL_H_ void tpool_resume(tpool_t *tpool); +_THREAD_POOL_H_ int tpool_member(tpool_t *tpool); #ifdef __cplusplus } diff --git a/lib/libavl/Makefile.am b/lib/libavl/Makefile.am index 2e0a431c7..3166febd0 100644 --- a/lib/libavl/Makefile.am +++ b/lib/libavl/Makefile.am @@ -4,6 +4,7 @@ VPATH = $(top_srcdir)/module/avl/ # Includes kernel code, generate warnings for large stack frames AM_CFLAGS += $(FRAME_LARGER_THAN) +AM_CFLAGS += -fvisibility=hidden noinst_LTLIBRARIES = libavl.la diff --git a/lib/libefi/Makefile.am b/lib/libefi/Makefile.am index b26f7a6dc..580319a31 100644 --- a/lib/libefi/Makefile.am +++ b/lib/libefi/Makefile.am @@ -1,6 +1,7 @@ include $(top_srcdir)/config/Rules.am AM_CFLAGS += $(LIBUUID_CFLAGS) $(ZLIB_CFLAGS) +AM_CFLAGS += -fvisibility=hidden noinst_LTLIBRARIES = libefi.la diff --git a/lib/libefi/rdwr_efi.c b/lib/libefi/rdwr_efi.c index 39b3509a5..fd243e230 100644 --- a/lib/libefi/rdwr_efi.c +++ b/lib/libefi/rdwr_efi.c @@ -140,40 +140,6 @@ static struct uuid_to_ptag { { EFI_FREEDESKTOP_BOOT } }; -/* - * Default vtoc information for non-SVr4 partitions - */ -struct dk_map2 default_vtoc_map[NDKMAP] = { - { V_ROOT, 0 }, /* a - 0 */ - { V_SWAP, V_UNMNT }, /* b - 1 */ - { V_BACKUP, V_UNMNT }, /* c - 2 */ - { V_UNASSIGNED, 0 }, /* d - 3 */ - { V_UNASSIGNED, 0 }, /* e - 4 */ - { V_UNASSIGNED, 0 }, /* f - 5 */ - { V_USR, 0 }, /* g - 6 */ - { V_UNASSIGNED, 0 }, /* h - 7 */ - -#if defined(_SUNOS_VTOC_16) - -#if defined(i386) || defined(__amd64) || defined(__arm) || \ - defined(__powerpc) || defined(__sparc) || defined(__s390__) || \ - defined(__mips__) || defined(__rv64g__) - { V_BOOT, V_UNMNT }, /* i - 8 */ - { V_ALTSCTR, 0 }, /* j - 9 */ - -#else -#error No VTOC format defined. -#endif /* defined(i386) */ - - { V_UNASSIGNED, 0 }, /* k - 10 */ - { V_UNASSIGNED, 0 }, /* l - 11 */ - { V_UNASSIGNED, 0 }, /* m - 12 */ - { V_UNASSIGNED, 0 }, /* n - 13 */ - { V_UNASSIGNED, 0 }, /* o - 14 */ - { V_UNASSIGNED, 0 }, /* p - 15 */ -#endif /* defined(_SUNOS_VTOC_16) */ -}; - int efi_debug = 0; static int efi_read(int, struct dk_gpt *); diff --git a/lib/libnvpair/Makefile.am b/lib/libnvpair/Makefile.am index a3e1fa307..7b9ebebe7 100644 --- a/lib/libnvpair/Makefile.am +++ b/lib/libnvpair/Makefile.am @@ -7,6 +7,7 @@ VPATH = \ # Includes kernel code, generate warnings for large stack frames # and required CFLAGS for libtirpc AM_CFLAGS += $(FRAME_LARGER_THAN) $(LIBTIRPC_CFLAGS) +AM_CFLAGS += -fvisibility=hidden lib_LTLIBRARIES = libnvpair.la diff --git a/lib/libnvpair/libnvpair.abi b/lib/libnvpair/libnvpair.abi index 697a67b7f..8c503fecd 100644 --- a/lib/libnvpair/libnvpair.abi +++ b/lib/libnvpair/libnvpair.abi @@ -232,132 +232,126 @@ - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -367,7 +361,7 @@ - + @@ -376,677 +370,677 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - - - - + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + + + + - - + + - - - - - + + + + + - - - + + + - + - - - - + + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - + - - + + - - - + + + - + - + - + - + - + - + - + @@ -1078,280 +1072,280 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - - - - - - + + + + + + - + - + - + - + - + - + @@ -1359,11 +1353,11 @@ - - - - - + + + + + @@ -1823,45 +1817,45 @@ - - - - + + + + - + - + - + - + - + - + - + - + - + @@ -1869,36 +1863,36 @@ - + - + - + - + - + - + - + - + - + - + @@ -1907,7 +1901,7 @@ - + @@ -1915,46 +1909,46 @@ - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1962,13 +1956,10 @@ - + - - - - + @@ -1990,721 +1981,718 @@ - - - + + - - - - - - + + + + - - + + - - + + - - + + - - + + - - - - + + + + - - - - + + + + - - + + - - - - + + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - - - - + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - - - + + + + @@ -2718,92 +2706,71 @@ - + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - + + + + + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - + @@ -2812,7 +2779,28 @@ - + + + + + + + + + + + + + + + + + + + + + + @@ -2874,40 +2862,40 @@ - - + + - + - - + + - + - - + + - + - - - + + + - + @@ -2915,734 +2903,734 @@ - - - + + + - - - + + + - + - - + + - + - - - + + + - + - - + + - - - + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/lib/libshare/Makefile.am b/lib/libshare/Makefile.am index e42609c64..dff3e5382 100644 --- a/lib/libshare/Makefile.am +++ b/lib/libshare/Makefile.am @@ -2,6 +2,8 @@ include $(top_srcdir)/config/Rules.am DEFAULT_INCLUDES += -I$(srcdir) +AM_CFLAGS += -fvisibility=hidden + noinst_LTLIBRARIES = libshare.la USER_C = \ diff --git a/lib/libshare/nfs.c b/lib/libshare/nfs.c index 44d3e93d4..e339ebc81 100644 --- a/lib/libshare/nfs.c +++ b/lib/libshare/nfs.c @@ -119,7 +119,7 @@ nfs_fini_tmpfile(const char *exports, char *tmpfile) return (SA_OK); } -__attribute__((visibility("hidden"))) int +int nfs_toggle_share(const char *lockfile, const char *exports, const char *expdir, sa_share_impl_t impl_share, int(*cbk)(sa_share_impl_t impl_share, char *filename)) diff --git a/lib/libshare/os/freebsd/nfs.c b/lib/libshare/os/freebsd/nfs.c index b82491f2e..0041bc228 100644 --- a/lib/libshare/os/freebsd/nfs.c +++ b/lib/libshare/os/freebsd/nfs.c @@ -147,7 +147,7 @@ translate_opts(const char *shareopts) * This function copies all entries from the exports file to "filename", * omitting any entries for the specified mountpoint. */ -__attribute__((visibility("hidden"))) int +int nfs_copy_entries(char *filename, const char *mountpoint) { int error = SA_OK; diff --git a/lib/libshare/os/linux/nfs.c b/lib/libshare/os/linux/nfs.c index c236f2569..bd578adee 100644 --- a/lib/libshare/os/linux/nfs.c +++ b/lib/libshare/os/linux/nfs.c @@ -400,7 +400,7 @@ nfs_add_entry(const char *filename, const char *sharepath, * This function copies all entries from the exports file to "filename", * omitting any entries for the specified mountpoint. */ -__attribute__((visibility("hidden"))) int +int nfs_copy_entries(char *filename, const char *mountpoint) { char *buf = NULL; diff --git a/lib/libspl/include/libshare.h b/lib/libspl/include/libshare.h index ea53f8c15..5d06b163a 100644 --- a/lib/libspl/include/libshare.h +++ b/lib/libspl/include/libshare.h @@ -25,7 +25,7 @@ * Copyright (c) 2019, 2020 by Delphix. All rights reserved. */ #ifndef _LIBSPL_LIBSHARE_H -#define _LIBSPL_LIBSHARE_H +#define _LIBSPL_LIBSHARE_H extern __attribute__((visibility("default"))) /* API Initialization */ #define SA_INIT_SHARE_API 0x0001 /* init share specific interface */ @@ -71,16 +71,16 @@ #define SA_SHARE_EXISTS 33 /* path or file is already shared */ /* initialization */ -extern char *sa_errorstr(int); +_LIBSPL_LIBSHARE_H char *sa_errorstr(int); /* share control */ -extern int sa_enable_share(const char *, const char *, const char *, +_LIBSPL_LIBSHARE_H int sa_enable_share(const char *, const char *, const char *, char *); -extern int sa_disable_share(const char *, char *); -extern boolean_t sa_is_shared(const char *, char *); -extern void sa_commit_shares(const char *); +_LIBSPL_LIBSHARE_H int sa_disable_share(const char *, char *); +_LIBSPL_LIBSHARE_H boolean_t sa_is_shared(const char *, char *); +_LIBSPL_LIBSHARE_H void sa_commit_shares(const char *); /* protocol specific interfaces */ -extern int sa_validate_shareopts(char *, char *); +_LIBSPL_LIBSHARE_H int sa_validate_shareopts(char *, char *); #endif /* _LIBSPL_LIBSHARE_H */ diff --git a/lib/libtpool/Makefile.am b/lib/libtpool/Makefile.am index aa8bde32f..40fd137b4 100644 --- a/lib/libtpool/Makefile.am +++ b/lib/libtpool/Makefile.am @@ -1,5 +1,7 @@ include $(top_srcdir)/config/Rules.am +AM_CFLAGS += -fvisibility=hidden + noinst_LTLIBRARIES = libtpool.la USER_C = \ diff --git a/lib/libzfs/libzfs.abi b/lib/libzfs/libzfs.abi index 3dd8b2b14..9a1d95d96 100644 --- a/lib/libzfs/libzfs.abi +++ b/lib/libzfs/libzfs.abi @@ -34,8 +34,6 @@ - - @@ -59,7 +57,6 @@ - @@ -350,7 +347,6 @@ - @@ -2686,13 +2682,6 @@ - - - - - - - @@ -2701,6 +2690,13 @@ + + + + + + + @@ -7576,6 +7572,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7643,23 +7684,21 @@ - + - - - - + + + + - - - - - - - - - - + + + + + + + + @@ -7668,6 +7707,11 @@ + + + + + @@ -7686,93 +7730,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -7789,10 +7752,10 @@ - + - + diff --git a/lib/libzfs_core/Makefile.am b/lib/libzfs_core/Makefile.am index 67e554dc8..b2101e211 100644 --- a/lib/libzfs_core/Makefile.am +++ b/lib/libzfs_core/Makefile.am @@ -2,6 +2,8 @@ include $(top_srcdir)/config/Rules.am pkgconfig_DATA = libzfs_core.pc +AM_CFLAGS += -fvisibility=hidden + lib_LTLIBRARIES = libzfs_core.la include $(top_srcdir)/config/Abigail.am diff --git a/lib/libzfs_core/libzfs_core.abi b/lib/libzfs_core/libzfs_core.abi index 79567d150..f397929e1 100644 --- a/lib/libzfs_core/libzfs_core.abi +++ b/lib/libzfs_core/libzfs_core.abi @@ -166,7 +166,6 @@ - @@ -240,7 +239,6 @@ - @@ -276,17 +274,12 @@ - - - - - @@ -1802,63 +1795,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -1870,14 +1811,14 @@ - + - + - + @@ -1888,16 +1829,16 @@ - + - + - + @@ -1909,20 +1850,20 @@ - + - + - + - - - + + + - + @@ -1931,10 +1872,10 @@ - + - + @@ -1942,74 +1883,74 @@ - - + + - + - + - + - + - - + + - + - + - - + + - + - - + + - - - - - + + + + + - - + + - - - + + + - + - + - - + + - + - + @@ -2019,25 +1960,13 @@ - - - - - - - - - - - - - - + + - - + + @@ -2046,7 +1975,7 @@ - + @@ -2072,12 +2001,27 @@ - - + + + + + + + + + + + + + + + + + - - + + @@ -2086,72 +2030,97 @@ - + - + - + - - + + - + - - + - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - - - - - + + + + + - + - + - - + + @@ -2197,8 +2166,8 @@ - - + + @@ -2212,8 +2181,8 @@ - - + + @@ -2225,42 +2194,42 @@ - - + + - - + + - + - + + - - + - + - + - + @@ -2275,12 +2244,12 @@ - + - - + + @@ -2303,21 +2272,21 @@ - - + + - + - + - + - + - + @@ -2326,15 +2295,15 @@ - - - + + + - - + + - + @@ -2344,13 +2313,13 @@ - + - + @@ -2359,28 +2328,28 @@ - + - + - + - - + + - + @@ -2390,7 +2359,7 @@ - + @@ -2402,7 +2371,7 @@ - + @@ -2431,7 +2400,7 @@ - + @@ -2457,25 +2426,25 @@ - - - - + + + + - + - - + + - - - + + + - - + + @@ -2490,14 +2459,14 @@ - - + + - - + + @@ -2519,15 +2488,15 @@ - + - + - + - + @@ -2536,10 +2505,10 @@ - + - - + + @@ -2555,7 +2524,7 @@ - + @@ -2569,16 +2538,16 @@ - + - + - + - + @@ -2587,27 +2556,27 @@ - + - + - + - - - - + + + + - + - + @@ -2619,65 +2588,65 @@ - - + + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - - + + - - + + - + - + @@ -2688,27 +2657,27 @@ - - + + + + + + + + + + - - - - - - - - - + - - + + @@ -2716,23 +2685,19 @@ - - - - - + - + - + @@ -2744,122 +2709,111 @@ - + - + - + - + - - - + + + - + - - + + - - + + - + - - + + - - + + - + - + - - - - - - - - - - - - - - + + + - + - + - - + + - - + + - + - + - - - + + + - - + + - + - + - + - + - + - + @@ -2878,143 +2832,145 @@ - - + + - + + + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - - + + - + - - + + - + - + - + - + - + - + - + - + - + - + - + @@ -3038,38 +2994,39 @@ - - - + + + + - + - + - + - + - + - + - + - + - + - + @@ -3078,19 +3035,19 @@ - + - + - + - + - - + + @@ -3099,212 +3056,212 @@ - + - - + + - - + + - + - + - - - - + + + + - + - + - - + + - - + + - - + + - - + + - + - - + + - + - + - + - + - + - + - + - + - + - - + + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - - + + - - + + - - + + - + - - + + - + - + - + - - + + - + - + - + - + - - + + - - + + - + - - + + - + - + @@ -3312,56 +3269,56 @@ - + - + - + - + - + - + - + - - + + - + - + - + - + - + @@ -3370,603 +3327,603 @@ - - + + - + - - - + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - - - + + + - - + + - - + + - + - + - + - + - + - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - + - + - + - + - - + + - - + + - + - - + + - - + + - - + + - + - + - - + + - + - + - - + + - - + + - - + + - + - + - - + + - + - + - - + + - - + + - - + + - + - + - - + + - + - + - - + + - - + + - - + + - + - + - - + + - + - - + + - - - + + + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - - + + + - + - + - + - + - + - + - + - + - - + + - - + + - + - - - + + + - - - + + + - - - + + + - + - + - - - + + + - + - + - - - + + + - - - + + + - - - + + + - + - + - - - + + + - + - + - - - - + + + + - - - - + + + + - - - - + + + + - + - + - - - - + + + + - + - + - + - - - + + + - - - + + + - - - + + + - + - + - - - + + + - + - + - + - + @@ -3996,7 +3953,7 @@ - + @@ -4034,10 +3991,10 @@ - + - + @@ -4046,28 +4003,28 @@ - + - + - + - + - + - + - + - + @@ -4079,36 +4036,36 @@ - + - - - - + + + + - - + + - - - - + + + + - - + + - + - - - + + + @@ -4122,14 +4079,14 @@ - + - - - + + + - + @@ -4149,24 +4106,24 @@ - + - - + + - + - + - - + + - + @@ -4186,76 +4143,76 @@ - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - + + + + + + + - + - + - - + + - + @@ -4263,126 +4220,126 @@ - + - + - + - + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - + - + - + - + - + - - + + - + @@ -4418,16 +4375,16 @@ - + - + - + @@ -4462,49 +4419,35 @@ - - - + + + - - + + - - + + - + - + - + - - - - - - - - - - - - - - - + @@ -4513,7 +4456,7 @@ - + @@ -4526,18 +4469,18 @@ - + - - + + - + - + @@ -4562,7 +4505,7 @@ - + diff --git a/lib/libzfsbootenv/Makefile.am b/lib/libzfsbootenv/Makefile.am index 984df0b8a..0c454a5e0 100644 --- a/lib/libzfsbootenv/Makefile.am +++ b/lib/libzfsbootenv/Makefile.am @@ -2,6 +2,8 @@ include $(top_srcdir)/config/Rules.am pkgconfig_DATA = libzfsbootenv.pc +AM_CFLAGS += -fvisibility=hidden + lib_LTLIBRARIES = libzfsbootenv.la include $(top_srcdir)/config/Abigail.am diff --git a/lib/libzutil/Makefile.am b/lib/libzutil/Makefile.am index 2f0357e9f..0bc29f05e 100644 --- a/lib/libzutil/Makefile.am +++ b/lib/libzutil/Makefile.am @@ -3,6 +3,7 @@ include $(top_srcdir)/config/Rules.am # Suppress unused but set variable warnings often due to ASSERTs AM_CFLAGS += $(NO_UNUSED_BUT_SET_VARIABLE) AM_CFLAGS += $(LIBBLKID_CFLAGS) $(LIBUDEV_CFLAGS) +AM_CFLAGS += -fvisibility=hidden DEFAULT_INCLUDES += -I$(srcdir)