Lines Matching refs:NULL

109 static struct doc2handle *sa_global_handles = NULL;
123 char *ret = NULL;
249 for (item = sa_global_handles; item != NULL; item = item->next) {
254 if (item != NULL)
256 return (NULL);
266 if (item != NULL) {
291 for (prev = NULL, item = sa_global_handles; item != NULL;
295 if (prev == NULL)
320 while (node != NULL) {
328 return (NULL);
343 xmlChar *lpath = NULL;
348 if (handle == NULL)
351 for (node = root->xmlChildrenNode; node != NULL;
356 if (lpath != NULL &&
361 if (lpath != NULL)
365 if (node == NULL) {
367 node = xmlNewChild(root, NULL, (xmlChar *)"legacy", NULL);
369 if (node != NULL) {
408 if (shared != NULL) {
432 if (protolist != NULL) {
434 while ((token = strtok(str, ",")) != NULL) {
439 str = NULL;
466 if (newpath == NULL)
469 for (share = sa_get_share(group, NULL); share != NULL;
484 * If path is NULL, then a share is in the process of
491 if (path == NULL)
501 path = NULL;
507 path = NULL;
528 char *path = NULL;
530 for (group = sa_get_group(handle, NULL);
531 group != NULL && issub == SA_OK;
536 subgroup != NULL && issub == SA_OK;
544 if (path != NULL)
570 if (share != NULL)
584 if (fstype != NULL && strcmp(fstype, "zfs") == 0) {
588 if (fstype != NULL)
612 if (type != NULL) {
641 if (name != NULL && isalpha(*name)) {
675 if (zfs != NULL) {
713 * return the SMF name for the optionset. If id is not NULL, it
730 if (id == NULL)
734 if (parent != NULL) {
743 if (index != NULL) {
752 if (proto != NULL)
763 * return the SMF name for the security. If id is not NULL, it will
779 if (id == NULL)
786 if (proto != NULL)
788 if (sectype != NULL)
805 if (defgrp != NULL) {
806 opt = sa_get_optionset(defgrp, NULL);
810 if (opt == NULL)
842 if (handle != NULL) {
848 if (sa_global_handles == NULL)
862 return (NULL);
869 if (handle->scfhandle != NULL) {
906 if (prop != NULL) {
909 if (i64 != NULL)
911 NULL, 0);
942 handle->tree = xmlNewNode(NULL,
944 if (handle->doc != NULL &&
945 handle->tree != NULL) {
955 if (handle->doc != NULL)
957 if (handle->tree != NULL)
980 return (NULL);
1017 if (prop != NULL) {
1021 if (str != NULL)
1023 strtoull(str, NULL, 0);
1047 if (impl_handle != NULL) {
1052 if (impl_handle->doc != NULL)
1064 if (sa_global_handles == NULL)
1080 * Returns pointer to an allocated and NULL terminated
1092 if (protocols != NULL) {
1094 for (numproto = 0, plug = sap_proto_list; plug != NULL;
1100 if (*protocols != NULL) {
1102 for (plug = sap_proto_list; plug != NULL;
1126 xmlChar *name = NULL;
1128 for (node = node->xmlChildrenNode; node != NULL;
1132 if (group == NULL)
1135 if (name != NULL && xmlStrcmp(name, group) == 0)
1137 if (name != NULL) {
1139 name = NULL;
1143 if (name != NULL)
1150 * Return the "group" specified. If groupname is NULL,
1156 xmlNodePtr node = NULL;
1157 char *subgroup = NULL;
1158 char *group = NULL;
1161 if (impl_handle != NULL && impl_handle->tree != NULL) {
1162 if (groupname != NULL) {
1164 if (group != NULL) {
1166 if (subgroup != NULL)
1172 * group is not NULL, then lookup the name. If it is
1173 * NULL, we only do the find if groupname is also
1174 * NULL. This allows lookup of the "first" group in
1177 if (group != NULL || groupname == NULL)
1182 if (subgroup != NULL && node != NULL)
1185 if (node != NULL && (char *)group != NULL)
1187 if (group != NULL)
1195 * the internal group list. NULL if there are no more.
1200 xmlNodePtr ngroup = NULL;
1201 if (group != NULL) {
1202 for (ngroup = ((xmlNodePtr)group)->next; ngroup != NULL;
1214 * must be in the specified group. Return NULL if not found.
1219 xmlNodePtr node = NULL;
1227 if (group != NULL) {
1228 for (node = ((xmlNodePtr)group)->children; node != NULL;
1231 if (sharepath == NULL) {
1237 if (path != NULL &&
1254 * from the internal list of shares. Returns NULL if there
1261 xmlNodePtr node = NULL;
1263 if (share != NULL) {
1264 for (node = ((xmlNodePtr)share)->next; node != NULL;
1285 for (child = node->xmlChildrenNode; child != NULL;
1289 return ((xmlNodePtr)NULL);
1305 for (share = sa_get_share(group, NULL); share != NULL;
1308 if (path != NULL && strcmp(path, sharepath) == 0) {
1312 if (path != NULL)
1346 sa_share_t share = NULL;
1349 for (group = sa_get_group(handle, NULL); group != NULL && !done;
1355 zgroup != NULL;
1358 if (share != NULL)
1364 if (share != NULL)
1388 if (handle == NULL)
1410 for (optionset = sa_get_optionset(group, NULL);
1411 optionset != NULL;
1416 if (value == NULL)
1445 for (optionset = sa_get_optionset(group, NULL);
1446 optionset != NULL;
1450 if (value == NULL)
1474 xmlNodePtr node = NULL;
1479 node = xmlNewChild((xmlNodePtr)group, NULL, (xmlChar *)"share", NULL);
1480 if (node == NULL) {
1481 if (error != NULL)
1501 if (sa_get_optionset(group, "nfs") != NULL)
1503 else if (sa_get_optionset(group, "smb") != NULL)
1509 if (impl_handle != NULL) {
1528 node = NULL;
1531 if (error != NULL)
1542 * it is a valid path to be shared. NULL is returned on error
1549 xmlNodePtr node = NULL;
1578 if (sa_find_share(handle, sharepath) == NULL) {
1604 * If protocol is NULL, then all protocols.
1615 if (sharepath == NULL)
1621 if (protocol != NULL) {
1637 for (optionset = sa_get_optionset(group, NULL);
1638 optionset != NULL;
1643 if (proto != NULL) {
1657 if (sharepath != NULL)
1665 * protocol is NULL, then all protocols that are enabled for the
1677 if (protocol != NULL) {
1687 for (optionset = sa_get_optionset(group, NULL);
1688 optionset != NULL;
1693 if (proto != NULL) {
1702 (void) sa_set_share_attr(share, "shared", NULL);
1703 if (path != NULL)
1729 if (type != NULL && strcmp(type, "persist") != 0)
1731 if (type != NULL)
1740 if (!transient || zfs != NULL) {
1742 ret = sa_delete_legacy(share, NULL);
1748 if (impl_handle != NULL) {
1758 if (sharepath != NULL) {
1766 if (groupname != NULL)
1768 if (zfs != NULL)
1802 if (impl_handle != NULL) {
1825 * passed in, we don't want a parent so return NULL.
1831 xmlNodePtr node = NULL;
1832 if (share != NULL) {
1839 if (node == NULL ||
1841 node = NULL;
1856 xmlNodePtr node = NULL;
1859 node = xmlNewChild(impl_handle->tree, NULL, (xmlChar *)"group",
1860 NULL);
1861 if (node != NULL) {
1881 xmlNodePtr node = NULL;
1883 node = xmlNewChild((xmlNodePtr)group, NULL, (xmlChar *)"group", NULL);
1884 if (node != NULL) {
1906 xmlNodePtr node = NULL;
1914 if (impl_handle == NULL || impl_handle->scfhandle == NULL) {
1920 if (group != NULL) {
1924 node = xmlNewChild(impl_handle->tree, NULL,
1925 (xmlChar *)"group", NULL);
1926 if (node != NULL) {
1992 node = NULL;
2002 if (error != NULL)
2022 if (impl_handle != NULL) {
2024 if (name != NULL) {
2067 xmlChar *name = NULL;
2069 if (node != NULL)
2086 if (node != NULL && tag != NULL) {
2087 if (value != NULL)
2133 if (impl_handle != NULL) {
2154 if (groupname != NULL)
2166 * share. Returns NULL if the tag doesn't exist.
2187 node = xmlNewChild((xmlNodePtr)share, NULL, (xmlChar *)"description",
2188 NULL);
2220 if (resource != share && resource != NULL)
2225 if (group != NULL) {
2229 if (type == NULL || strcmp(type, "transient") != 0) {
2234 if (impl_handle != NULL) {
2242 if (type != NULL)
2313 xmlChar *value = NULL;
2315 for (node = ((xmlNodePtr)group)->children; node != NULL;
2319 if (proto != NULL) {
2320 if (value != NULL &&
2324 if (value != NULL) {
2326 value = NULL;
2333 if (value != NULL)
2341 * Return the next optionset in the group. NULL if this was the last.
2349 for (node = ((xmlNodePtr)optionset)->next; node != NULL;
2371 xmlChar *value = NULL;
2373 for (node = ((xmlNodePtr)group)->children; node != NULL;
2376 if (proto != NULL) {
2378 if (value == NULL ||
2379 (value != NULL &&
2383 value = NULL;
2387 if (value != NULL) {
2389 value = NULL;
2392 if (sectype != NULL) {
2394 if (value != NULL &&
2402 if (value != NULL) {
2404 value = NULL;
2407 if (value != NULL)
2423 for (node = ((xmlNodePtr)security)->next; node != NULL;
2443 xmlChar *value = NULL;
2445 if (optionset == NULL)
2446 return (NULL);
2448 for (node = node->children; node != NULL;
2451 if (prop == NULL)
2454 if (value != NULL &&
2458 if (value != NULL) {
2460 value = NULL;
2464 if (value != NULL)
2466 if (node != NULL && xmlStrcmp(node->name, (xmlChar *)"option") != 0) {
2471 node = NULL;
2479 * Get the next property following the specified property. NULL if
2488 for (node = ((xmlNodePtr)property)->next; node != NULL;
2510 for (node = ((xmlNodePtr)share)->children; node != NULL;
2517 if (node == NULL && content != NULL) {
2520 } else if (node != NULL && content != NULL) {
2523 } else if (node != NULL && content == NULL) {
2529 if (group != NULL &&
2533 if (impl_handle != NULL) {
2565 * exists. NULL if no description exists.
2571 xmlChar *description = NULL;
2574 for (node = ((xmlNodePtr)share)->children; node != NULL;
2580 if (node != NULL) {
2611 sa_share_t share = NULL;
2613 char *id = NULL;
2616 if (optionset != NULL) {
2618 optionset = NULL;
2635 /* id can be NULL if the group is transient (ZFS) */
2636 if (id == NULL && sa_is_persistent(group))
2646 return (NULL);
2650 NULL, (xmlChar *)"optionset", NULL);
2655 if (optionset != NULL) {
2676 if (groupname != NULL && sa_is_persistent(group)) {
2681 assert(impl_handle != NULL);
2682 if (impl_handle != NULL) {
2689 if (groupname != NULL)
2694 if (id != NULL)
2709 xmlNodePtr node = NULL;
2711 if (property != NULL)
2726 xmlNodePtr node = NULL;
2728 if (optionset != NULL)
2750 if (attr != NULL) {
2754 set_node_attr((void *)share, "changed", NULL);
2788 if (group != NULL && (sa_is_share(group) || is_zfs_group(group))) {
2792 if (parent != NULL && is_zfs_group(parent))
2802 if (impl_handle != NULL) {
2830 char *id = NULL;
2836 if (group != NULL) {
2851 if (impl_handle != NULL) {
2862 if (id != NULL)
2889 char *id = NULL;
2891 char *groupname = NULL;
2893 if (group != NULL && sa_is_share(group)) {
2896 if (parent != NULL)
2898 } else if (group != NULL) {
2903 if (security != NULL) {
2905 security = NULL;
2908 NULL, (xmlChar *)"security", NULL);
2909 if (security != NULL) {
2916 if (groupname != NULL && sa_is_persistent(group)) {
2921 if (impl_handle != NULL) {
2930 if (id != NULL)
2932 if (groupname != NULL)
2950 char *id = NULL;
2957 if (group != NULL)
2960 if (group != NULL && !iszfs) {
2971 if (impl_handle != NULL) {
2983 if (id != NULL)
3037 if (value != NULL) {
3077 char *id = NULL;
3079 sa_group_t parent = NULL;
3080 sa_share_t share = NULL;
3092 if (impl_handle == NULL || impl_handle->scfhandle == NULL)
3104 if (valstr != NULL && entry != NULL) {
3108 if (parent != NULL)
3112 if (share != NULL)
3118 if (scf_handle->trans == NULL) {
3120 char *groupname = NULL;
3121 if (share != NULL) {
3122 if (parent != NULL)
3132 if (groupname != NULL) {
3144 if (id != NULL)
3172 if (name != NULL)
3174 if (valstr != NULL)
3176 else if (entry != NULL)
3196 node = xmlNewNode(NULL, (xmlChar *)"section");
3197 if (node != NULL) {
3198 if (name != NULL)
3201 if (extra != NULL)
3225 node = xmlNewNode(NULL, (xmlChar *)"option");
3226 if (node != NULL) {
3248 if (property != NULL) {
3258 if (proto != NULL)
3262 if (proto != NULL)
3285 if (property == NULL) {
3291 char *id = NULL;
3297 if (impl_handle == NULL ||
3298 impl_handle->scfhandle == NULL)
3306 if (scf_handle->trans == NULL) {
3326 if (name != NULL && value != NULL) {
3336 if (name != NULL)
3339 if (value != NULL)
3342 if (id != NULL)
3376 if (property != NULL) {
3380 if (optionset != NULL) {
3382 if (group != NULL) {
3398 * Update the specified property to the new value. If value is NULL,
3406 if (value == NULL) {
3413 if (optionset != NULL) {
3415 if (group != NULL) {
3437 xmlChar *value = NULL;
3442 if (proto != NULL)
3447 for (node = node->children; node != NULL;
3450 if (section == NULL)
3453 if (value != NULL &&
3457 if (value != NULL) {
3459 value = NULL;
3463 if (value != NULL)
3465 if (proto != NULL)
3467 if (node != NULL && xmlStrcmp(node->name, (xmlChar *)"section") != 0) {
3472 node = NULL;
3487 xmlChar *value = NULL;
3492 if (proto != NULL)
3494 return ((sa_property_t)NULL);
3497 for (node = ((xmlNodePtr)prop)->next; node != NULL;
3500 if (find == NULL)
3503 if (value != NULL &&
3507 if (value != NULL) {
3509 value = NULL;
3514 if (value != NULL)
3516 if (proto != NULL)
3532 xmlChar *value = NULL;
3534 if (propset == NULL)
3535 return (NULL);
3537 for (node = node->children; node != NULL;
3540 if (prop == NULL)
3543 if (value != NULL &&
3547 if (value != NULL) {
3549 value = NULL;
3553 if (value != NULL)
3555 if (node != NULL && xmlStrcmp(node->name, (xmlChar *)"option") != 0) {
3560 node = NULL;
3575 xmlChar *value = NULL;
3577 for (node = ((xmlNodePtr)prop)->next; node != NULL;
3580 if (find == NULL)
3583 if (value != NULL &&
3587 if (value != NULL) {
3589 value = NULL;
3594 if (value != NULL)
3614 if (propset != NULL) {
3616 if (proto != NULL) {
3617 if (section != NULL)
3641 if (node != NULL)
3657 node = xmlNewNode(NULL, (xmlChar *)"propertyset");
3658 if (node != NULL)
3667 * NULL, get the first resource.
3673 xmlNodePtr node = NULL;
3676 if (share != NULL) {
3677 for (node = ((xmlNodePtr)share)->children; node != NULL;
3680 if (resource == NULL) {
3691 if (name != NULL &&
3708 * from the internal list of shares. Returns NULL if there
3715 xmlNodePtr node = NULL;
3717 if (resource != NULL) {
3718 for (node = ((xmlNodePtr)resource)->next; node != NULL;
3740 for (resource = sa_get_share_resource(share, NULL);
3741 resource != NULL;
3744 if (id != NULL) {
3777 if (res != NULL) {
3779 res = NULL;
3781 node = xmlNewChild((xmlNodePtr)share, NULL,
3782 (xmlChar *)"resource", NULL);
3783 if (node != NULL) {
3805 if (ihandle != NULL)
3818 if (error != NULL)
3844 if (type != NULL) {
3851 (void) sa_disable_resource(resource, NULL);
3854 for (opt = sa_get_optionset(resource, NULL);
3855 opt != NULL;
3870 if (ihandle != NULL)
3895 for (optionset = sa_get_optionset(group, NULL);
3896 optionset != NULL;
3900 if (type != NULL) {
3921 sa_group_t group = NULL;
3924 sa_handle_t handle = NULL;
3927 if (share == NULL)
3931 if (group == NULL)
3935 if (handle == NULL)
3939 if (target != NULL) {
3968 * currently defined. NULL if tag not defined.
3981 * currently defined. NULL if tag not defined. Currently we don't do
4001 sa_share_t share = NULL;
4003 if (resource != NULL)
4018 sa_resource_t resource = NULL;
4022 for (share = sa_get_share(group, NULL);
4023 share != NULL && resource == NULL;
4025 for (resource = sa_get_share_resource(share, NULL);
4026 resource != NULL;
4029 if (name != NULL && xmlStrcasecmp((xmlChar*)name,
4034 if (name != NULL) {
4053 sa_resource_t resource = NULL;
4059 for (group = sa_get_group(handle, NULL); group != NULL;
4066 zgroup != NULL && resource == NULL;
4073 if (resource != NULL)
4085 * In the future, it may be advantageous to allow group to be NULL and
4092 sa_share_t share = NULL;
4093 sa_resource_t res = NULL;
4095 if (resource != NULL) {
4096 for (share = sa_get_share(group, NULL);
4097 share != NULL && res == NULL;
4118 for (opts = sa_get_optionset(object, NULL);
4119 opts != NULL;
4127 if (type == NULL)
4131 if (prop != NULL)
4134 /* If prop is NULL, don't bother continuing */
4135 if (prop == NULL) {
4151 if (optionset != NULL) {
4174 sa_share_t share = NULL;
4175 sa_group_t group = NULL;
4176 sa_resource_t resource = NULL;
4179 if (object == NULL)
4180 return (NULL);
4181 options = (sa_optionset_t)xmlNewNode(NULL, (xmlChar *)"optionset");
4182 if (options == NULL)
4183 return (NULL);
4199 if (resource != NULL)
4201 if (ret == SA_OK && share != NULL)
4203 if (ret == SA_OK && group != NULL)
4213 options = NULL;
4221 * If protocol is NULL, then all protocols.
4228 if (protocol != NULL) {
4238 if (protoset == NULL)
4240 for (prop = sa_get_property(protoset, NULL);
4241 prop != NULL;
4244 if (proto == NULL) {
4256 (void) sa_set_resource_attr(resource, "shared", NULL);
4265 * protocol is NULL, then all protocols. If the underlying
4274 if (protocol != NULL) {
4285 if (parent != NULL)
4298 if (protoset == NULL)
4300 for (prop = sa_get_property(protoset, NULL);
4301 prop != NULL;
4304 if (proto == NULL) {
4312 if (parent != NULL)
4324 (void) sa_set_resource_attr(resource, "shared", NULL);
4344 node != NULL;
4352 if (node == NULL && content != NULL) {
4355 } else if (node != NULL && content != NULL) {
4358 } else if (node != NULL && content == NULL) {
4366 if (group != NULL &&
4370 if (impl_handle != NULL)
4383 * exists. NULL if no description exists.
4389 xmlChar *description = NULL;
4392 for (node = ((xmlNodePtr)resource)->children; node != NULL;
4397 if (node != NULL) {