mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
libshare: fold into libzfs and reorg headers a little
libzfs is the only user of libshare, and only internally, so there's no particular reason to build it separately, nor to export its symbols. So, pull it into libzfs proper, remove its "public" header, and hide its symbols. The bare minimum "public" API is just to count and enumerate the supported share types. These are moved to libzfs.h with the other share API. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #18072
This commit is contained in:
+4
-5
@@ -7339,15 +7339,14 @@ append_options(char *mntopts, char *newopts)
|
||||
static enum sa_protocol
|
||||
sa_protocol_decode(const char *protocol)
|
||||
{
|
||||
for (enum sa_protocol i = 0; i < ARRAY_SIZE(sa_protocol_names); ++i)
|
||||
if (strcmp(protocol, sa_protocol_names[i]) == 0)
|
||||
for (enum sa_protocol i = 0; i < SA_PROTOCOL_COUNT; ++i)
|
||||
if (strcmp(protocol, zfs_share_protocol_name(i)) == 0)
|
||||
return (i);
|
||||
|
||||
(void) fputs(gettext("share type must be one of: "), stderr);
|
||||
for (enum sa_protocol i = 0;
|
||||
i < ARRAY_SIZE(sa_protocol_names); ++i)
|
||||
for (enum sa_protocol i = 0; i < SA_PROTOCOL_COUNT; ++i)
|
||||
(void) fprintf(stderr, "%s%s",
|
||||
i != 0 ? ", " : "", sa_protocol_names[i]);
|
||||
i != 0 ? ", " : "", zfs_share_protocol_name(i));
|
||||
(void) fputc('\n', stderr);
|
||||
usage(B_FALSE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user