Lines Matching defs:sh_name

726 sa_share_validate_name(const char *sh_name, const char *sh_path,
733 if (sh_name == NULL) {
741 if ((rc = saproto_share_validate_name(sh_name, p, flags,
748 if (sa_share_lookup(sh_name, NULL, SA_PROT_ANY,
757 sa_strerror(rc), sh_name);
771 sa_strerror(rc), sh_name);
781 rc = sacache_share_validate_name(sh_name, flags);
788 sa_strerror(rc), sh_name);
812 char *sh_name = NULL;
865 if (nvpair_value_string(nvp, &sh_name) != 0) {
873 if ((rc = sa_share_validate_name(sh_name, resolved_path,
990 if (sh_name == NULL) {
1169 char *sh_path, *sh_name;
1177 if ((sh_name = sa_share_get_name(share)) == NULL) {
1192 ret = safs_sharing_enabled(shdl, sh_path, sh_name,
1364 sa_share_list_add(nvlist_t **share_list, nvlist_t *share, const char *sh_name,
1382 sh_name, share) != 0) {
1707 char *sh_name = sa_share_get_name(share);
1714 assert(sh_name != NULL && sh_path != NULL);
1716 sa_tracef("check_name_conflict_start: %s:%s", sh_name, sh_path);
1718 if (sa_share_lookup(sh_name, NULL, proto, &active_shr) == SA_OK) {
1726 if ((old_name = strdup(sh_name)) == NULL) {
1742 sh_name = sa_share_get_name(share);
1751 old_name, sh_path, sh_name);
1779 char *sh_name;
1830 if (((sh_name = sa_share_get_name(share)) == NULL) ||
1852 * Update sh_name in case it was freed by
1856 if ((sh_name = sa_share_get_name(share)) == NULL) {
1865 rc = sa_share_list_add(share_list, share, sh_name,
1917 char *sh_name;
1941 if (((sh_name = sa_share_get_name(share)) == NULL) ||
1951 rc = sa_share_list_add(share_list, share, sh_name,
1995 char *sh_name;
2001 if ((sh_name = sa_share_get_name(share)) == NULL)
2022 rc = sa_share_lookup(sh_name, NULL, SA_PROT_ALL, &old_share);
2069 char *sh_name;
2071 if ((sh_name = strdup(basename)) == NULL)
2077 sa_path_to_shr_name(sh_name);
2078 new_share = sa_share_alloc(sh_name, sh_path);
2079 free(sh_name);
2119 char *sh_name;
2134 if ((sh_name = sa_share_get_name(proto_props)) != NULL) {
2135 new_share = sa_share_alloc(sh_name, sh_path);
2150 if ((sh_name = strdup(basename)) == NULL) {
2154 sa_path_to_shr_name(sh_name);
2157 new_share = sa_share_alloc(sh_name, sh_path);
2158 free(sh_name);
2323 * sh_name : name of share to remove
2333 sa_share_remove(libshare_handle_t *shdl, const char *sh_name,
2341 if (sh_name == NULL) {
2349 if (sa_share_read(shdl, sh_path, sh_name, &share) != SA_OK) {
2392 rc = safs_share_remove(shdl, sh_name, sh_path, persist);
2405 rc = sa_share_lookup(sh_name, sh_path, SA_PROT_ALL, &share);
2420 * sh_name or sh_path can be NULL but not both.
2422 * If sh_name is non NULL return the share if found and is
2425 * If sh_path is non NULL, search specified dataset for sh_name.
2426 * If sh_name is NULL, return first share found.
2431 sa_share_lookup(const char *sh_name, const char *sh_path, sa_proto_t proto,
2434 if (sh_name == NULL)
2437 return (sacache_share_lookup(sh_name, sh_path, proto, share));
2449 * sh_name: name of share to read.
2456 sa_share_read(libshare_handle_t *shdl, const char *mntpnt, const char *sh_name,
2463 if (sh_name == NULL)
2471 rc = safs_share_read(shdl, mntpnt, sh_name, share);
2502 rc = safs_share_read(shdl, mntpnt, sh_name, share);
2771 sa_share_get_acl(libshare_handle_t *shdl, const char *sh_name,
2776 if (sh_name == NULL)
2783 rc = safs_share_get_acl(shdl, sh_name, sh_path, aclp);
2789 sa_share_set_acl(libshare_handle_t *shdl, const char *sh_name,
2794 if (sh_name == NULL)
2801 rc = safs_share_set_acl(shdl, sh_name, sh_path, acl);
2870 const char *sh_name)
2876 rc = safs_sharing_enabled(shdl, path, sh_name, &proto);
2890 const char *sh_name, sa_proto_t proto)
2897 rc = safs_sharing_get_prop(shdl, mntpnt, sh_name, proto, &strval);
2915 const char *sh_name, sa_proto_t prot, char **sh_props)
2920 rc = safs_sharing_get_prop(shdl, mntpnt, sh_name, prot, sh_props);
2933 const char *sh_name, sa_proto_t proto, const char *sh_prop)
2938 rc = safs_sharing_set_prop(shdl, mntpnt, sh_name, proto, sh_prop);