Lines Matching defs:rc

288 sa_get_fs_handle(libshare_handle_t *shdl, sa_fs_t fstype, int *rc)
298 if (rc != NULL)
299 *rc = err;
564 int rc;
577 rc = SA_NO_MEMORY;
578 (void) snprintf(errbuf, buflen, "%s", sa_strerror(rc));
579 return (rc);
588 rc = SA_NO_SUCH_PROTO;
590 sa_strerror(rc), prot_name);
591 return (rc);
609 rc = SA_NO_SUCH_PROTO;
611 sa_strerror(rc), prot_name);
612 return (rc);
616 rc = SA_NO_MEMORY;
618 sa_strerror(rc));
619 return (rc);
640 int rc;
650 if ((rc = sa_share_merge_prot(nvp, dst_share,
652 return (rc);
661 rc = SA_NO_SHARE_NAME;
665 sa_strerror(rc));
666 return (rc);
675 rc = SA_NO_SHARE_NAME;
679 sa_strerror(rc));
680 return (rc);
684 rc = SA_INVALID_SHARE_NAME;
688 sa_strerror(rc));
689 return (rc);
698 rc = SA_NO_SUCH_PROP;
701 sa_strerror(rc), propname);
702 return (rc);
706 rc = SA_NO_MEMORY;
708 sa_strerror(rc));
709 return (rc);
731 int rc;
734 rc = SA_NO_SHARE_NAME;
735 (void) snprintf(errbuf, buflen, "%s", sa_strerror(rc));
736 return (rc);
741 if ((rc = saproto_share_validate_name(sh_name, p, flags,
743 return (rc);
754 rc = SA_NO_SHARE_PATH;
757 sa_strerror(rc), sh_name);
759 return (rc);
768 rc = SA_DUPLICATE_NAME;
771 sa_strerror(rc), sh_name);
773 return (rc);
781 rc = sacache_share_validate_name(sh_name, flags);
782 if (rc != SA_OK &&
783 rc != SA_NOT_SUPPORTED &&
784 rc != SA_NOT_IMPLEMENTED) {
786 rc = SA_DUPLICATE_NAME;
788 sa_strerror(rc), sh_name);
789 return (rc);
818 int rc;
821 rc = SA_NO_SHARE_PATH;
822 (void) snprintf(errbuf, buflen, "%s", sa_strerror(rc));
823 return (rc);
834 rc = SA_PATH_NOT_FOUND;
836 sa_strerror(rc), sh_path);
837 return (rc);
851 if ((rc = sa_share_set_path(share, resolved_path)) != SA_OK) {
853 (void) snprintf(errbuf, buflen, "%s", sa_strerror(rc));
854 return (rc);
867 rc = SA_NO_SHARE_NAME;
869 sa_strerror(rc));
870 return (rc);
873 if ((rc = sa_share_validate_name(sh_name, resolved_path,
876 return (rc);
884 rc = SA_NO_SHARE_PATH;
886 sa_strerror(rc));
887 return (rc);
896 rc = SA_PATH_NOT_FOUND;
898 sa_strerror(rc), sh_path);
899 return (rc);
906 rc = SA_NO_SHARE_DESC;
908 sa_strerror(rc));
909 return (rc);
924 rc = SA_INVALID_PROP_VAL;
926 sa_strerror(rc));
927 return (rc);
948 rc = saproto_share_validate(shdl, share, proto,
951 if (rc != SA_OK) {
954 return (rc);
957 switch (rc) {
965 rc = SA_OK;
969 return (rc);
978 rc = SA_INVALID_PROP;
980 sa_strerror(rc), propname);
981 return (rc);
991 rc = SA_NO_SHARE_NAME;
992 (void) snprintf(errbuf, buflen, "%s", sa_strerror(rc));
993 return (rc);
1000 rc = SA_NO_SHARE_PATH;
1001 (void) snprintf(errbuf, buflen, "%s", sa_strerror(rc));
1002 return (rc);
1009 rc = SA_NO_SHARE_PROTO;
1010 (void) snprintf(errbuf, buflen, "%s", sa_strerror(rc));
1011 return (rc);
1048 sa_alloc_return_codes(sa_proto_t proto, int rc, nvlist_t **nvlp)
1059 if (nvlist_add_int32(notification, tag, rc) != 0)
1070 sa_add_return_code(nvlist_t *nvl, sa_proto_t proto, int rc)
1077 if (nvlist_add_int32(nvl, tag, rc) != 0)
1147 int rc)
1151 if (sa_alloc_return_codes(proto, rc, &return_codes) == SA_OK) {
1171 int rc, ret = SA_OK;
1178 rc = SA_NO_SHARE_NAME;
1183 rc = SA_NO_SHARE_PATH;
1228 rc = saproto_share_publish(share, p, wait);
1231 rc)) != SA_OK)
1234 if (rc != SA_OK)
1235 ret = rc;
1266 int rc, ret = SA_OK;
1281 rc = saproto_share_unpublish(share, p, wait);
1284 rc)) != SA_OK)
1287 if (rc != SA_OK)
1288 ret = rc;
1308 int rc, ret = SA_OK;
1312 rc = saproto_share_publish_admin(mntpnt, p);
1313 if (rc != SA_OK)
1314 ret = rc;
1368 int rc = SA_OK;
1383 rc = SA_NO_MEMORY;
1389 return (rc);
1431 int rc = SA_OK;
1481 rc = err;
1484 rc = (notify_op == SA_NOTIFY_OP_PUBLISH
1633 * There will be an error for the return code (rc != SA_OK) if
1692 return (rc);
1712 int rc = SA_OK;
1727 rc = SA_NO_MEMORY;
1731 rc = sa_resolve_share_name_conflict(shdl, share,
1734 if (rc != SA_OK) {
1735 salog_error(rc, "%s:%s not shared: "
1760 sa_tracef("check_name_conflict_end: %d:%s", rc, sa_strerror(rc));
1762 return (rc);
1777 int rc;
1796 rc = safs_sharing_enabled(shdl, mntpnt, NULL, &protos_enabled);
1797 if (rc != SA_OK) {
1799 return (rc);
1814 rc = SA_NO_MEMORY;
1821 if ((rc = sa_share_read_init(shdl, mntpnt, B_TRUE,
1823 if (rc == SA_SHARE_NOT_FOUND)
1824 rc = SA_OK;
1837 rc = sa_share_check_name_conflict(shdl, share, proto,
1839 if (rc == SA_NO_MEMORY) {
1844 } else if (rc != SA_OK) {
1846 sa_publish_notify(shdl, share, proto, rc);
1865 rc = sa_share_list_add(share_list, share, sh_name,
1868 if (rc != SA_OK) {
1879 rc = sa_share_list_publish(shdl, share_list, proto_cnt, wait);
1884 if (rc != SA_OK) {
1885 salog_error(rc,
1891 rc = SA_DUPLICATE_NAME;
1893 sa_tracef("fs_publish_stop: %s: %s", mntpnt, sa_strerror(rc));
1894 return (rc);
1915 int rc;
1926 rc = SA_NO_MEMORY;
1933 if ((rc = sa_share_find_init(mntpnt, proto, &hdl)) != SA_OK) {
1934 if (rc == SA_SHARE_NOT_FOUND || rc == SA_NOT_SUPPORTED)
1935 rc = SA_OK;
1951 rc = sa_share_list_add(share_list, share, sh_name,
1954 if (rc != SA_OK) {
1966 rc = sa_share_list_unpublish(shdl, share_list, proto_cnt, wait);
1970 if (rc != SA_OK) {
1971 salog_error(rc, "sa_fs_unpublish: "
1975 sa_tracef("fs_unpublish_stop: %s: %s", mntpnt, sa_strerror(rc));
1977 return (rc);
1994 int rc;
2009 if ((rc = safs_share_write(shdl, share, persist)) != SA_OK) {
2011 return (rc);
2022 rc = sa_share_lookup(sh_name, NULL, SA_PROT_ALL, &old_share);
2023 if (rc == SA_OK) {
2067 int rc;
2090 rc = sa_share_set_def_proto(new_share, proto);
2091 if (rc != SA_OK) {
2093 salog_error(rc, "sa_share_read_default: %s: "
2095 return (rc);
2100 return (rc);
2116 int rc;
2129 if ((rc = saproto_share_parse(proto, propstr, 0, &proto_props, errbuf,
2131 return (rc);
2159 if (rc != SA_OK) {
2161 salog_error(rc, "sa_share_read_from_props: "
2163 return (rc);
2172 rc = sa_share_set_proto(new_share, proto, proto_props);
2174 if (rc != SA_OK) {
2176 salog_error(rc, "sa_share_read_from_props: "
2178 return (rc);
2182 return (rc);
2199 int rc = SA_OK;
2210 rc = SA_NO_MEMORY;
2211 salog_error(rc, "sa_share_read_oldprop_shares: %s", mntpnt);
2212 return (rc);
2240 rc = err;
2266 rc = err;
2280 rc = SA_NO_SHARE_PATH;
2285 rc = SA_NO_SHARE_NAME;
2298 rc = SA_NO_MEMORY;
2316 return (rc);
2336 int rc;
2392 rc = safs_share_remove(shdl, sh_name, sh_path, persist);
2397 return (rc);
2405 rc = sa_share_lookup(sh_name, sh_path, SA_PROT_ALL, &share);
2406 if (rc != SA_OK) {
2461 int rc;
2471 rc = safs_share_read(shdl, mntpnt, sh_name, share);
2473 return (rc);
2502 rc = safs_share_read(shdl, mntpnt, sh_name, share);
2503 if (rc == SA_OK) {
2507 return (rc);
2568 int rc, ret = SA_OK;
2596 while ((rc = getmntent(srhp->srh_mnttab_fp, &entry)) == 0) {
2609 if ((rc = safs_share_read_init(shdl,
2622 if (rc == SA_NO_MEMORY) {
2624 salog_error(rc, "sa_share_read_init");
2626 return (rc);
2634 if (rc < 0) {
2640 MNTTAB, rc);
2672 int rc;
2682 rc = safs_share_read_next(shdl, srhp, share);
2683 if (rc == SA_OK) {
2705 while ((rc = getmntent(srhp->srh_mnttab_fp, &entry)) == 0) {
2717 if ((rc = safs_share_read_init(shdl,
2719 (rc = safs_share_read_next(shdl,
2726 if (rc == SA_NO_MEMORY) {
2728 return (rc);
2740 if (rc < 0) {
2746 "error reading %s: %d", MNTTAB, rc);
2752 return (rc);
2774 int rc;
2783 rc = safs_share_get_acl(shdl, sh_name, sh_path, aclp);
2785 return (rc);
2792 int rc;
2801 rc = safs_share_set_acl(shdl, sh_name, sh_path, acl);
2803 return (rc);
2817 int rc;
2823 rc = safs_get_mntpnt_for_path(shdl, sh_path, mntpnt, mp_len, fstypep,
2826 return (rc);
2873 int rc;
2876 rc = safs_sharing_enabled(shdl, path, sh_name, &proto);
2879 return (rc == SA_OK ? proto : SA_PROT_NONE);
2893 int rc;
2897 rc = safs_sharing_get_prop(shdl, mntpnt, sh_name, proto, &strval);
2898 if (rc == SA_OK) {
2917 int rc;
2920 rc = safs_sharing_get_prop(shdl, mntpnt, sh_name, prot, sh_props);
2923 return (rc);
2935 int rc;
2938 rc = safs_sharing_set_prop(shdl, mntpnt, sh_name, proto, sh_prop);
2941 return (rc);
2954 int rc, ret = SA_OK;
2959 rc = saproto_share_set_def_proto(p, share);
2960 if (rc != SA_OK)
2961 ret = rc;
2987 int rc;
3000 rc = sa_get_mntpnt_for_path(shdl, path, mntpnt,
3002 if (rc != SA_OK) {
3512 int rc;
3516 (rc = nvlist_add_string(props_nvl, "share.name", sname)) != 0)
3543 if ((rc = nvlist_add_string(props_nvl, dotprop, propval)) != 0)
3560 rc = SA_INTERNAL_ERR;
3563 rc = saproto_share_proplist_from_share(proto, prot_nvl,
3565 if (rc != SA_OK)
3575 rc = SA_NO_MEMORY;
3577 return (rc);