aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzfs/libzfs_impl.h
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-05-15 11:53:14 +0200
committerBrian Behlendorf <[email protected]>2021-06-03 13:17:55 -0700
commit739cfb965b00e9cc3155c4a0d6c24bd779b1a245 (patch)
tree16a02e6478c8e5fdff12455afb28dafc95bd0b3b /lib/libzfs/libzfs_impl.h
parente00aae4be2b5f126eb67ff3cdfd1b8e09e99fc0b (diff)
libzfs: convert to -fvisibility=hidden
Also mark all printf-like funxions in libzfs_impl.h as printf-like and add --no-show-locs to storeabi, in hopes diffs will make more sense in future This removes these symbols from libzfs: D nfs_only T SHA256Init T SHA2Final T SHA2Init T SHA2Update T SHA384Init T SHA512Init D share_all_proto D smb_only T zfs_is_shared_proto W zpool_mount_datasets W zpool_unmount_datasets Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: John Kennedy <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12048
Diffstat (limited to 'lib/libzfs/libzfs_impl.h')
-rw-r--r--lib/libzfs/libzfs_impl.h101
1 files changed, 52 insertions, 49 deletions
diff --git a/lib/libzfs/libzfs_impl.h b/lib/libzfs/libzfs_impl.h
index de6730408..ce7373582 100644
--- a/lib/libzfs/libzfs_impl.h
+++ b/lib/libzfs/libzfs_impl.h
@@ -131,27 +131,31 @@ typedef struct zfs_uri_handler {
#define CONFIG_BUF_MINSIZE 262144
-int zfs_error(libzfs_handle_t *, int, const char *);
-int zfs_error_fmt(libzfs_handle_t *, int, const char *, ...);
-void zfs_error_aux(libzfs_handle_t *, const char *, ...);
-void *zfs_alloc(libzfs_handle_t *, size_t);
-void *zfs_realloc(libzfs_handle_t *, void *, size_t, size_t);
-char *zfs_asprintf(libzfs_handle_t *, const char *, ...);
-char *zfs_strdup(libzfs_handle_t *, const char *);
-int no_memory(libzfs_handle_t *);
-
-int zfs_standard_error(libzfs_handle_t *, int, const char *);
-int zfs_standard_error_fmt(libzfs_handle_t *, int, const char *, ...);
-void zfs_setprop_error(libzfs_handle_t *, zfs_prop_t, int, char *);
-int zpool_standard_error(libzfs_handle_t *, int, const char *);
-int zpool_standard_error_fmt(libzfs_handle_t *, int, const char *, ...);
-
-zfs_handle_t *make_dataset_handle_zc(libzfs_handle_t *, zfs_cmd_t *);
-zfs_handle_t *make_dataset_simple_handle_zc(zfs_handle_t *, zfs_cmd_t *);
-
-int zprop_parse_value(libzfs_handle_t *, nvpair_t *, int, zfs_type_t,
+extern int zfs_error(libzfs_handle_t *, int, const char *);
+extern int zfs_error_fmt(libzfs_handle_t *, int, const char *, ...)
+ __attribute__((format(printf, 3, 4)));
+extern void zfs_error_aux(libzfs_handle_t *, const char *, ...)
+ __attribute__((format(printf, 2, 3)));
+extern void *zfs_alloc(libzfs_handle_t *, size_t);
+extern void *zfs_realloc(libzfs_handle_t *, void *, size_t, size_t);
+extern char *zfs_asprintf(libzfs_handle_t *, const char *, ...)
+ __attribute__((format(printf, 2, 3)));
+extern char *zfs_strdup(libzfs_handle_t *, const char *);
+extern int no_memory(libzfs_handle_t *);
+
+extern int zfs_standard_error_fmt(libzfs_handle_t *, int, const char *, ...)
+ __attribute__((format(printf, 3, 4)));
+extern void zfs_setprop_error(libzfs_handle_t *, zfs_prop_t, int, char *);
+extern int zpool_standard_error(libzfs_handle_t *, int, const char *);
+extern int zpool_standard_error_fmt(libzfs_handle_t *, int, const char *, ...)
+ __attribute__((format(printf, 3, 4)));
+
+extern zfs_handle_t *make_dataset_handle_zc(libzfs_handle_t *, zfs_cmd_t *);
+extern zfs_handle_t *make_dataset_simple_handle_zc(zfs_handle_t *, zfs_cmd_t *);
+
+extern int zprop_parse_value(libzfs_handle_t *, nvpair_t *, int, zfs_type_t,
nvlist_t *, char **, uint64_t *, const char *);
-int zprop_expand_list(libzfs_handle_t *hdl, zprop_list_t **plp,
+extern int zprop_expand_list(libzfs_handle_t *hdl, zprop_list_t **plp,
zfs_type_t type);
/*
@@ -171,44 +175,42 @@ int zprop_expand_list(libzfs_handle_t *hdl, zprop_list_t **plp,
typedef struct prop_changelist prop_changelist_t;
-int zcmd_alloc_dst_nvlist(libzfs_handle_t *, zfs_cmd_t *, size_t);
-int zcmd_write_src_nvlist(libzfs_handle_t *, zfs_cmd_t *, nvlist_t *);
-int zcmd_write_conf_nvlist(libzfs_handle_t *, zfs_cmd_t *, nvlist_t *);
-int zcmd_expand_dst_nvlist(libzfs_handle_t *, zfs_cmd_t *);
-int zcmd_read_dst_nvlist(libzfs_handle_t *, zfs_cmd_t *, nvlist_t **);
-void zcmd_free_nvlists(zfs_cmd_t *);
-
-int changelist_prefix(prop_changelist_t *);
-int changelist_postfix(prop_changelist_t *);
-void changelist_rename(prop_changelist_t *, const char *, const char *);
-void changelist_remove(prop_changelist_t *, const char *);
-void changelist_free(prop_changelist_t *);
-prop_changelist_t *changelist_gather(zfs_handle_t *, zfs_prop_t, int, int);
-int changelist_unshare(prop_changelist_t *, zfs_share_proto_t *);
-int changelist_haszonedchild(prop_changelist_t *);
-
-void remove_mountpoint(zfs_handle_t *);
-int create_parents(libzfs_handle_t *, char *, int);
-boolean_t isa_child_of(const char *dataset, const char *parent);
-
-zfs_handle_t *make_dataset_handle(libzfs_handle_t *, const char *);
-zfs_handle_t *make_bookmark_handle(zfs_handle_t *, const char *,
+extern int zcmd_alloc_dst_nvlist(libzfs_handle_t *, zfs_cmd_t *, size_t);
+extern int zcmd_write_src_nvlist(libzfs_handle_t *, zfs_cmd_t *, nvlist_t *);
+extern int zcmd_write_conf_nvlist(libzfs_handle_t *, zfs_cmd_t *, nvlist_t *);
+extern int zcmd_expand_dst_nvlist(libzfs_handle_t *, zfs_cmd_t *);
+extern int zcmd_read_dst_nvlist(libzfs_handle_t *, zfs_cmd_t *, nvlist_t **);
+extern void zcmd_free_nvlists(zfs_cmd_t *);
+
+extern int changelist_prefix(prop_changelist_t *);
+extern int changelist_postfix(prop_changelist_t *);
+extern void changelist_rename(prop_changelist_t *, const char *, const char *);
+extern void changelist_remove(prop_changelist_t *, const char *);
+extern void changelist_free(prop_changelist_t *);
+extern prop_changelist_t *changelist_gather(zfs_handle_t *, zfs_prop_t, int,
+ int);
+extern int changelist_unshare(prop_changelist_t *, zfs_share_proto_t *);
+extern int changelist_haszonedchild(prop_changelist_t *);
+
+extern void remove_mountpoint(zfs_handle_t *);
+extern int create_parents(libzfs_handle_t *, char *, int);
+
+extern zfs_handle_t *make_dataset_handle(libzfs_handle_t *, const char *);
+extern zfs_handle_t *make_bookmark_handle(zfs_handle_t *, const char *,
nvlist_t *props);
-int zpool_open_silent(libzfs_handle_t *, const char *, zpool_handle_t **);
+extern int zpool_open_silent(libzfs_handle_t *, const char *,
+ zpool_handle_t **);
-boolean_t zpool_name_valid(libzfs_handle_t *, boolean_t, const char *);
+extern boolean_t zpool_name_valid(libzfs_handle_t *, boolean_t, const char *);
-int zfs_validate_name(libzfs_handle_t *hdl, const char *path, int type,
+extern int zfs_validate_name(libzfs_handle_t *hdl, const char *path, int type,
boolean_t modifying);
-void namespace_clear(libzfs_handle_t *);
+extern void namespace_clear(libzfs_handle_t *);
extern int zfs_parse_options(char *, zfs_share_proto_t);
-extern int zfs_unshare_proto(zfs_handle_t *,
- const char *, zfs_share_proto_t *);
-
typedef struct {
zfs_prop_t p_prop;
char *p_name;
@@ -243,6 +245,7 @@ extern int do_mount(zfs_handle_t *zhp, const char *mntpt, char *opts,
int flags);
extern int do_unmount(const char *mntpt, int flags);
extern int zfs_share_proto(zfs_handle_t *zhp, zfs_share_proto_t *proto);
+extern int zfs_unshare_proto(zfs_handle_t *, const char *, zfs_share_proto_t *);
extern int unshare_one(libzfs_handle_t *hdl, const char *name,
const char *mountpoint, zfs_share_proto_t proto);
extern boolean_t zfs_is_mountable(zfs_handle_t *zhp, char *buf, size_t buflen,