Lines Matching refs:cur

420 	char *cur, *eob;
429 cur = newpath;
430 *cur = '/';
435 assert(*cur == '/');
441 * "/.." components. The cur pointer will move backward in
443 * value less than newpath. The second phase advances the cur
463 if (cur == newpath)
466 cur--;
467 } while (cur >= newpath && *cur != '/');
477 /* next has just moved past a slash. cur must do the same. */
478 cur++;
484 while (cur < eob && *next != '/' && *next != '\0') {
485 *cur = *next;
486 cur++;
490 *cur = *next;
491 if (cur == eob) {
492 if (*cur != '\0')
499 * cur references the last character copied, which is always '\0'. The
503 * NB: The cur++ at the beginning of phase 2 ensures cur > newpath.
505 cur--;
506 if (cur > newpath && *cur == '/')
507 *cur = '\0';
852 fetch_xml_prop(xmlNodePtr cur, const xmlChar *propname, char **dst)
856 if ((property = xmlGetProp(cur, propname)) == NULL)
867 fetch_alloc_prop(zone_dochandle_t handle, xmlNodePtr cur, const xmlChar *prop,
872 const char *res = dtd_to_rt(cur->name);
875 err = fetch_xml_prop(cur, prop, &val);
897 return (fetch_xml_prop(cur, prop, dst));
908 return (fetch_xml_prop(cur, prop, dst));
912 fetchprop(zone_dochandle_t handle, xmlNodePtr cur, const xmlChar *propname,
919 if ((err = fetch_alloc_prop(handle, cur, propname, &tmp)) != Z_OK)
977 setprop(zone_dochandle_t handle, xmlNodePtr cur, const xmlChar *propname,
987 if ((err = can_set_prop(handle, dtd_to_rt(cur->name),
996 (void) xmlUnsetProp(cur, propname);
1000 if (xmlSetProp(cur, propname, (const xmlChar *) propval) == NULL)
2177 newres(zone_dochandle_t handle, xmlNodePtr cur, xmlNodePtr *newnode,
2185 *newnode = xmlNewTextChild(cur, NULL, dtd, NULL);
2193 xmlNodePtr newnode, cur = handle->zone_dh_cur, options_node;
2197 if ((err = newres(handle, cur, &newnode, DTD_ELEM_FS)) != Z_OK)
2304 match_prop(zone_dochandle_t handle, xmlNodePtr cur, const xmlChar *attr,
2310 if (fetch_alloc_prop(handle, cur, attr, &gotten_prop) != Z_OK)
2322 xmlNodePtr cur = handle->zone_dh_cur;
2325 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2326 if (xmlStrcmp(cur->name, DTD_ELEM_FS))
2328 dir_match = match_prop(handle, cur, DTD_ATTR_DIR,
2330 spec_match = match_prop(handle, cur, DTD_ATTR_SPECIAL,
2332 raw_match = match_prop(handle, cur, DTD_ATTR_RAW,
2334 type_match = match_prop(handle, cur, DTD_ATTR_TYPE,
2337 xmlUnlinkNode(cur);
2338 xmlFreeNode(cur);
2390 xmlNodePtr cur, options, firstmatch;
2408 cur = handle->zone_dh_cur;
2410 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2411 if (xmlStrcmp(cur->name, DTD_ELEM_FS))
2414 if ((fetchprop(handle, cur, DTD_ATTR_DIR, dirname,
2418 firstmatch = cur;
2424 if ((fetchprop(handle, cur, DTD_ATTR_SPECIAL, special,
2429 firstmatch = cur;
2430 else if (firstmatch != cur)
2437 if (firstmatch == cur)
2443 if ((fetchprop(handle, cur, DTD_ATTR_RAW, raw,
2447 firstmatch = cur;
2448 else if (firstmatch != cur)
2455 if (firstmatch == cur)
2461 if ((fetchprop(handle, cur, DTD_ATTR_TYPE, type,
2465 firstmatch = cur;
2466 else if (firstmatch != cur)
2473 if (firstmatch == cur)
2483 cur = firstmatch;
2485 if ((err = fetchprop(handle, cur, DTD_ATTR_DIR, tabptr->zone_fs_dir,
2489 if ((err = fetchprop(handle, cur, DTD_ATTR_SPECIAL,
2494 if ((err = fetchprop(handle, cur, DTD_ATTR_RAW, tabptr->zone_fs_raw,
2498 if ((err = fetchprop(handle, cur, DTD_ATTR_TYPE, tabptr->zone_fs_type,
2504 for (options = cur->xmlChildrenNode; options != NULL;
2625 xmlNodePtr cur;
2631 cur = handle->zone_dh_cur;
2632 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2633 if (xmlStrcmp(cur->name, DTD_ELEM_NET) == 0) {
2634 if ((fetchprop(handle, cur, DTD_ATTR_PHYSICAL,
2639 if (xmlStrcmp(cur->name, DTD_ELEM_ANET) == 0) {
2640 if ((fetchprop(handle, cur, DTD_ATTR_LINKNAME,
2668 xmlNodePtr cur;
2711 cur = handle->zone_dh_cur;
2712 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2714 if (xmlStrcmp(cur->name, DTD_ELEM_NET))
2721 if (physspec != 0 && (fetchprop(handle, cur, DTD_ATTR_PHYSICAL,
2726 (fetchprop(handle, cur, DTD_ATTR_ADDRESS, address,
2732 (fetchprop(handle, cur, DTD_ATTR_ALLOWED_ADDRESS,
2737 if (defrouterspec != 0 && (fetchprop(handle, cur,
2747 firstmatch = cur;
2754 cur = firstmatch;
2756 if ((err = fetchprop(handle, cur, DTD_ATTR_PHYSICAL,
2762 (err = fetchprop(handle, cur, DTD_ATTR_ADDRESS,
2768 (err = fetchprop(handle, cur, DTD_ATTR_ALLOWED_ADDRESS,
2773 if ((err = fetchprop(handle, cur, DTD_ATTR_CONFIGURE_ALLOWED_ADDRESS,
2778 if ((err = fetchprop(handle, cur, DTD_ATTR_DEFROUTER,
2789 xmlNodePtr newnode, cur = handle->zone_dh_cur;
2792 if ((err = newres(handle, cur, &newnode, DTD_ELEM_NET)) != Z_OK)
2870 xmlNodePtr cur = handle->zone_dh_cur;
2873 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2874 if (xmlStrcmp(cur->name, DTD_ELEM_NET))
2877 addr_match = match_prop(handle, cur, DTD_ATTR_ADDRESS,
2879 allowed_addr_match = match_prop(handle, cur,
2882 phys_match = match_prop(handle, cur, DTD_ATTR_PHYSICAL,
2886 xmlUnlinkNode(cur);
2887 xmlFreeNode(cur);
2933 if (tabptr->pname[0] != '\0' && (fetchprop(handle, cur, dtdattr, \
2941 xmlNodePtr cur;
2982 cur = handle->zone_dh_cur;
2983 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
2985 if (xmlStrcmp(cur->name, DTD_ELEM_ANET))
3044 firstmatch = cur;
3051 cur = firstmatch;
3053 if ((err = fetchprop(handle, cur, DTD_ATTR_LINKNAME,
3058 if ((err = fetchprop(handle, cur, DTD_ATTR_LOWER_LINK,
3063 if ((err = fetchprop(handle, cur, DTD_ATTR_ALLOWED_ADDRESS,
3068 if ((err = fetchprop(handle, cur, DTD_ATTR_CONFIGURE_ALLOWED_ADDRESS,
3073 if ((err = fetchprop(handle, cur, DTD_ATTR_DEFROUTER,
3078 if ((err = fetchprop(handle, cur, DTD_ATTR_ALLOWED_DHCP_CIDS,
3083 if ((err = fetchprop(handle, cur, DTD_ATTR_LINK_PROTECTION,
3088 if ((err = fetchprop(handle, cur, DTD_ATTR_AUTO_MAC_ADDRESS,
3093 if ((err = fetchprop(handle, cur, DTD_ATTR_MAC_ADDRESS,
3098 if ((err = fetchprop(handle, cur, DTD_ATTR_MAC_PREFIX,
3103 if ((err = fetchprop(handle, cur, DTD_ATTR_MAC_SLOT,
3108 if ((err = fetchprop(handle, cur, DTD_ATTR_VLAN_ID,
3113 if ((err = fetchprop(handle, cur, DTD_ATTR_PRIORITY,
3118 if ((err = fetchprop(handle, cur, DTD_ATTR_RXRINGS,
3123 if ((err = fetchprop(handle, cur, DTD_ATTR_TXRINGS,
3128 if ((err = fetchprop(handle, cur, DTD_ATTR_MTU,
3133 if ((err = fetchprop(handle, cur, DTD_ATTR_MAXBW,
3138 if ((err = fetchprop(handle, cur, DTD_ATTR_RXFANOUT,
3143 if ((err = fetchprop(handle, cur, DTD_ATTR_VSITYPEID,
3148 if ((err = fetchprop(handle, cur, DTD_ATTR_VSIVERS,
3153 if ((err = fetchprop(handle, cur, DTD_ATTR_VSIMGRID,
3158 if ((err = fetchprop(handle, cur, DTD_ATTR_ETSBWLCL,
3163 if ((err = fetchprop(handle, cur, DTD_ATTR_COS,
3168 if ((err = fetchprop(handle, cur, DTD_ATTR_PKEY,
3173 if ((err = fetchprop(handle, cur, DTD_ATTR_LINKMODE,
3184 xmlNodePtr newnode, cur = handle->zone_dh_cur;
3187 if ((err = newres(handle, cur, &newnode, DTD_ELEM_ANET)) != Z_OK)
3352 xmlNodePtr cur = handle->zone_dh_cur;
3354 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
3355 if (xmlStrcmp(cur->name, DTD_ELEM_ANET))
3362 if (match_prop(handle, cur, DTD_ATTR_LINKNAME,
3364 xmlUnlinkNode(cur);
3365 xmlFreeNode(cur);
3559 xmlNodePtr cur, firstmatch;
3569 cur = handle->zone_dh_cur;
3571 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
3572 if (xmlStrcmp(cur->name, DTD_ELEM_DEVICE))
3576 (fetchprop(handle, cur, DTD_ATTR_MATCH, val,
3580 firstmatch = cur;
3581 else if (firstmatch != cur)
3588 if (firstmatch == cur)
3594 (fetchprop(handle, cur, DTD_ATTR_ALLOW_PARTITION, val,
3598 firstmatch = cur;
3599 else if (firstmatch != cur)
3606 if (firstmatch == cur)
3612 (fetchprop(handle, cur, DTD_ATTR_ALLOW_RAW_IO, val,
3616 firstmatch = cur;
3617 else if (firstmatch != cur)
3624 if (firstmatch == cur)
3632 cur = firstmatch;
3634 if ((err = fetchprop(handle, cur, DTD_ATTR_MATCH,
3638 if ((err = fetchprop(handle, cur, DTD_ATTR_ALLOW_PARTITION,
3642 if ((err = fetchprop(handle, cur, DTD_ATTR_ALLOW_RAW_IO,
3652 xmlNodePtr newnode, cur = handle->zone_dh_cur;
3655 if ((err = newres(handle, cur, &newnode, DTD_ELEM_DEVICE)) != Z_OK)
3695 xmlNodePtr cur = handle->zone_dh_cur;
3700 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
3701 if (xmlStrcmp(cur->name, DTD_ELEM_DEVICE))
3704 match_match = match_prop(handle, cur, DTD_ATTR_MATCH,
3706 partition_match = match_prop(handle, cur,
3708 raw_io_match = match_prop(handle, cur, DTD_ATTR_ALLOW_RAW_IO,
3712 xmlUnlinkNode(cur);
3713 xmlFreeNode(cur);
3764 xmlNodePtr newnode, cur = handle->zone_dh_cur;
3767 if ((err = newres(handle, cur, &newnode, DTD_ELEM_ADMIN)) != Z_OK)
3804 xmlNodePtr cur = handle->zone_dh_cur;
3808 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
3809 if (xmlStrcmp(cur->name, DTD_ELEM_ADMIN))
3811 auth_match = match_prop(handle, cur, DTD_ATTR_USER,
3818 xmlUnlinkNode(cur);
3819 xmlFreeNode(cur);
3869 xmlNodePtr cur, firstmatch;
3879 cur = handle->zone_dh_cur;
3881 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
3882 if (xmlStrcmp(cur->name, DTD_ELEM_ADMIN))
3885 if ((fetchprop(handle, cur, DTD_ATTR_USER, user,
3889 firstmatch = cur;
3898 cur = firstmatch;
3900 if ((err = fetchprop(handle, cur, DTD_ATTR_USER,
3905 if ((err = fetchprop(handle, cur, DTD_ATTR_AUTHS,
3973 xmlNodePtr cur, firstmatch;
3983 cur = handle->zone_dh_cur;
3985 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
3986 if (xmlStrcmp(cur->name, DTD_ELEM_ATTR))
3989 if ((fetchprop(handle, cur, DTD_ATTR_NAME, name,
3993 firstmatch = cur;
3999 if ((fetchprop(handle, cur, DTD_ATTR_TYPE, type,
4003 firstmatch = cur;
4004 else if (firstmatch != cur)
4011 if (firstmatch == cur)
4017 if ((fetchprop(handle, cur, DTD_ATTR_VALUE, value,
4022 firstmatch = cur;
4023 else if (firstmatch != cur)
4030 if (firstmatch == cur)
4039 cur = firstmatch;
4041 if ((err = fetchprop(handle, cur, DTD_ATTR_NAME, tabptr->zone_attr_name,
4045 if ((err = fetchprop(handle, cur, DTD_ATTR_TYPE, tabptr->zone_attr_type,
4049 if ((err = fetchprop(handle, cur, DTD_ATTR_VALUE,
4060 xmlNodePtr newnode, cur = handle->zone_dh_cur;
4063 if ((err = newres(handle, cur, &newnode, DTD_ELEM_ATTR)) != Z_OK)
4097 xmlNodePtr cur = handle->zone_dh_cur;
4100 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
4101 if (xmlStrcmp(cur->name, DTD_ELEM_ATTR))
4104 name_match = match_prop(handle, cur, DTD_ATTR_NAME,
4106 type_match = match_prop(handle, cur, DTD_ATTR_TYPE,
4108 value_match = match_prop(handle, cur, DTD_ATTR_VALUE,
4112 xmlUnlinkNode(cur);
4113 xmlFreeNode(cur);
4248 xmlNodePtr cur, val;
4259 cur = handle->zone_dh_cur;
4260 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
4261 if (xmlStrcmp(cur->name, DTD_ELEM_RCTL))
4263 if ((fetchprop(handle, cur, DTD_ATTR_NAME, savedname,
4267 for (val = cur->xmlChildrenNode; val != NULL;
4301 xmlNodePtr newnode, cur = handle->zone_dh_cur, valnode;
4305 if ((err = newres(handle, cur, &newnode, DTD_ELEM_RCTL)) != Z_OK)
4351 xmlNodePtr cur = handle->zone_dh_cur;
4353 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
4354 if (xmlStrcmp(cur->name, DTD_ELEM_RCTL))
4357 if (match_prop(handle, cur, DTD_ATTR_NAME,
4359 xmlUnlinkNode(cur);
4360 xmlFreeNode(cur);
4609 xmlNodePtr cur;
4619 cur = handle->zone_dh_cur;
4620 cur = cur->xmlChildrenNode;
4621 handle->zone_dh_cur = cur;
4820 xmlNodePtr cur;
4828 for (cur = handle->zone_dh_cur; cur != NULL; cur = cur->next)
4829 if (xmlStrcmp(cur->name, dtd) == 0)
4842 xmlNodePtr cur;
4850 cur = handle->zone_dh_cur;
4851 while (cur != NULL) {
4854 if (xmlStrcmp(cur->name, dtd)) {
4855 cur = cur->next;
4859 tmp = cur->next;
4860 xmlUnlinkNode(cur);
4861 xmlFreeNode(cur);
4862 cur = tmp;
5607 xmlNodePtr cur;
5625 if ((cur = handle->zone_dh_cur) != NULL) {
5626 for (; cur != NULL; cur = cur->next)
5627 if (!xmlStrcmp(cur->name, elem))
5631 return (cur);
5637 xmlNodePtr cur, options;
5644 cur = find_elem_node(handle, DTD_ELEM_FS);
5645 if (cur == NULL) {
5650 if ((err = fetchprop(handle, cur, DTD_ATTR_SPECIAL,
5657 if ((err = fetchprop(handle, cur, DTD_ATTR_RAW, tabptr->zone_fs_raw,
5663 if ((err = fetchprop(handle, cur, DTD_ATTR_DIR, tabptr->zone_fs_dir,
5669 if ((err = fetchprop(handle, cur, DTD_ATTR_TYPE, tabptr->zone_fs_type,
5677 for (options = cur->xmlChildrenNode; options != NULL;
5686 handle->zone_dh_cur = cur->next;
5705 xmlNodePtr cur;
5711 cur = find_elem_node(handle, DTD_ELEM_NET);
5712 if (cur == NULL) {
5717 if ((err = fetchprop(handle, cur, DTD_ATTR_ADDRESS,
5724 if ((err = fetchprop(handle, cur, DTD_ATTR_ALLOWED_ADDRESS,
5731 if ((err = fetchprop(handle, cur, DTD_ATTR_CONFIGURE_ALLOWED_ADDRESS,
5745 if ((err = fetchprop(handle, cur, DTD_ATTR_PHYSICAL,
5752 if ((err = fetchprop(handle, cur, DTD_ATTR_DEFROUTER,
5759 handle->zone_dh_cur = cur->next;
5778 xmlNodePtr cur;
5784 cur = find_elem_node(handle, DTD_ELEM_ANET);
5785 if (cur == NULL) {
5790 if ((err = fetchprop(handle, cur, DTD_ATTR_LINKNAME,
5797 if ((err = fetchprop(handle, cur, DTD_ATTR_LOWER_LINK,
5804 if ((err = fetchprop(handle, cur, DTD_ATTR_ALLOWED_ADDRESS,
5811 if ((err = fetchprop(handle, cur, DTD_ATTR_CONFIGURE_ALLOWED_ADDRESS,
5825 if ((err = fetchprop(handle, cur, DTD_ATTR_DEFROUTER,
5832 if ((err = fetchprop(handle, cur, DTD_ATTR_ALLOWED_DHCP_CIDS,
5839 if ((err = fetchprop(handle, cur, DTD_ATTR_LINK_PROTECTION,
5846 if ((err = fetchprop(handle, cur, DTD_ATTR_AUTO_MAC_ADDRESS,
5853 if ((err = fetchprop(handle, cur, DTD_ATTR_MAC_ADDRESS,
5860 if ((err = fetchprop(handle, cur, DTD_ATTR_MAC_PREFIX,
5867 if ((err = fetchprop(handle, cur, DTD_ATTR_MAC_SLOT,
5874 if ((err = fetchprop(handle, cur, DTD_ATTR_VLAN_ID,
5881 if ((err = fetchprop(handle, cur, DTD_ATTR_PRIORITY,
5888 if ((err = fetchprop(handle, cur, DTD_ATTR_RXRINGS,
5895 if ((err = fetchprop(handle, cur, DTD_ATTR_TXRINGS,
5902 if ((err = fetchprop(handle, cur, DTD_ATTR_MTU,
5909 if ((err = fetchprop(handle, cur, DTD_ATTR_MAXBW,
5916 if ((err = fetchprop(handle, cur, DTD_ATTR_RXFANOUT,
5923 if ((err = fetchprop(handle, cur, DTD_ATTR_VSITYPEID,
5930 if ((err = fetchprop(handle, cur, DTD_ATTR_VSIVERS,
5937 if ((err = fetchprop(handle, cur, DTD_ATTR_VSIMGRID,
5944 if ((err = fetchprop(handle, cur, DTD_ATTR_ETSBWLCL,
5951 if ((err = fetchprop(handle, cur, DTD_ATTR_COS,
5958 if ((err = fetchprop(handle, cur, DTD_ATTR_PKEY,
5965 if ((err = fetchprop(handle, cur, DTD_ATTR_LINKMODE,
5972 handle->zone_dh_cur = cur->next;
5992 xmlNodePtr cur;
5998 cur = find_elem_node(handle, DTD_ELEM_DEVICE);
5999 if (cur == NULL) {
6004 if ((err = fetchprop(handle, cur, DTD_ATTR_MATCH,
6010 if ((err = fetchprop(handle, cur, DTD_ATTR_ALLOW_PARTITION,
6016 if ((err = fetchprop(handle, cur,
6023 handle->zone_dh_cur = cur->next;
6042 xmlNodePtr cur, val;
6049 cur = find_elem_node(handle, DTD_ELEM_RCTL);
6050 if (cur == NULL) {
6055 if ((err = fetchprop(handle, cur, DTD_ATTR_NAME, tabptr->zone_rctl_name,
6062 for (val = cur->xmlChildrenNode; val != NULL; val = val->next) {
6083 handle->zone_dh_cur = cur->next;
6102 xmlNodePtr cur;
6108 cur = find_elem_node(handle, DTD_ELEM_ATTR);
6109 if (cur == NULL) {
6114 if ((err = fetchprop(handle, cur, DTD_ATTR_NAME, tabptr->zone_attr_name,
6120 if ((err = fetchprop(handle, cur, DTD_ATTR_TYPE, tabptr->zone_attr_type,
6126 if ((err = fetchprop(handle, cur, DTD_ATTR_VALUE,
6133 handle->zone_dh_cur = cur->next;
6152 xmlNodePtr cur;
6158 cur = find_elem_node(handle, DTD_ELEM_ADMIN);
6159 if (cur == NULL) {
6164 if ((err = fetchprop(handle, cur, DTD_ATTR_USER,
6172 if ((err = fetchprop(handle, cur, DTD_ATTR_AUTHS,
6179 handle->zone_dh_cur = cur->next;
7553 xmlNodePtr newnode, cur = handle->zone_dh_cur;
7556 if ((err = newres(handle, cur, &newnode, DTD_ELEM_DATASET)) != Z_OK)
7587 xmlNodePtr cur = handle->zone_dh_cur;
7589 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
7590 if (xmlStrcmp(cur->name, DTD_ELEM_DATASET))
7593 if (match_prop(handle, cur, DTD_ATTR_NAME,
7595 xmlUnlinkNode(cur);
7596 xmlFreeNode(cur);
7646 xmlNodePtr cur, firstmatch;
7656 cur = handle->zone_dh_cur;
7658 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
7659 if (xmlStrcmp(cur->name, DTD_ELEM_DATASET))
7662 if ((fetchprop(handle, cur, DTD_ATTR_NAME, name,
7666 firstmatch = cur;
7672 if ((fetchprop(handle, cur, DTD_ATTR_ALIAS, name,
7676 firstmatch = cur;
7685 cur = firstmatch;
7687 if ((err = fetchprop(handle, cur, DTD_ATTR_NAME,
7691 if ((err = fetchprop(handle, cur, DTD_ATTR_ALIAS,
7708 xmlNodePtr cur;
7714 cur = find_elem_node(handle, DTD_ELEM_DATASET);
7715 if (cur == NULL) {
7720 if ((err = fetchprop(handle, cur, DTD_ATTR_NAME,
7727 if (fetchprop(handle, cur, DTD_ATTR_ALIAS, tabptr->zone_dataset_alias,
7732 handle->zone_dh_cur = cur->next;
7764 xmlNodePtr cur, val;
7780 cur = handle->zone_dh_cur;
7781 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
7782 if (xmlStrcmp(cur->name, DTD_ELEM_RCTL) != 0)
7784 if ((fetchprop(handle, cur, DTD_ATTR_NAME, savedname,
7796 for (val = cur->xmlChildrenNode; val != NULL;
7932 xmlNodePtr cur = handle->zone_dh_cur;
7937 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
7938 if (xmlStrcmp(cur->name, DTD_ELEM_TMPPOOL) == 0) {
7939 xmlUnlinkNode(cur);
7940 xmlFreeNode(cur);
7952 xmlNodePtr cur = handle->zone_dh_cur;
7963 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_TMPPOOL, NULL);
7975 xmlNodePtr newnode, cur = handle->zone_dh_cur;
7978 newnode = xmlNewTextChild(cur, NULL, DTD_ELEM_PSET, NULL);
8014 xmlNodePtr cur = handle->zone_dh_cur;
8019 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
8020 if (xmlStrcmp(cur->name, DTD_ELEM_PSET) == 0) {
8021 xmlUnlinkNode(cur);
8022 xmlFreeNode(cur);
8059 xmlNodePtr cur;
8072 cur = handle->zone_dh_cur;
8073 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
8074 if (xmlStrcmp(cur->name, DTD_ELEM_PSET) == 0) {
8075 if ((err = fetchprop(handle, cur, DTD_ATTR_NCPU_MIN,
8082 if ((err = fetchprop(handle, cur, DTD_ATTR_NCPU_MAX,
8091 } else if (xmlStrcmp(cur->name, DTD_ELEM_TMPPOOL) == 0) {
8092 if ((err = fetchprop(handle, cur, DTD_ATTR_IMPORTANCE,
8122 xmlNodePtr newnode, cur = handle->zone_dh_cur;
8125 if ((err = newres(handle, cur, &newnode, DTD_ELEM_MCAP)) != Z_OK)
8138 xmlNodePtr cur = handle->zone_dh_cur;
8143 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
8144 if (xmlStrcmp(cur->name, DTD_ELEM_MCAP) != 0)
8147 xmlUnlinkNode(cur);
8148 xmlFreeNode(cur);
8176 xmlNodePtr cur;
8185 cur = handle->zone_dh_cur;
8186 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
8187 if (xmlStrcmp(cur->name, DTD_ELEM_MCAP) != 0)
8189 if ((err = fetchprop(handle, cur, DTD_ATTR_PHYSCAP,
8205 xmlNodePtr cur;
8211 cur = find_elem_node(handle, DTD_ELEM_MCAP);
8212 if (cur == NULL) {
8217 if ((err = fetchprop(handle, cur, DTD_ATTR_PHYSCAP,
8224 handle->zone_dh_cur = cur->next;
9234 xmlNodePtr cur;
9242 cur = handle->zone_dh_cur;
9243 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
9244 if (xmlStrcmp(cur->name, DTD_ELEM_ADMIN))
9246 if (fetchprop(handle, cur, DTD_ATTR_USER, user,
9249 if (fetchprop(handle, cur, DTD_ATTR_AUTHS, auths,
9270 xmlNodePtr cur;
9277 cur = handle->zone_dh_cur;
9278 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
9279 if (xmlStrcmp(cur->name, DTD_ELEM_ADMIN))
9281 if (fetchprop(handle, cur, DTD_ATTR_USER, user,
9574 zonecfg_fetch_rootzpool_storage(zone_dochandle_t handle, xmlNodePtr cur,
9582 for (src = cur->xmlChildrenNode; src != NULL; src = src->next) {
9595 zonecfg_fetch_zpool_storage(zone_dochandle_t handle, xmlNodePtr cur,
9603 for (src = cur->xmlChildrenNode; src != NULL; src = src->next) {
9632 xmlNodePtr cur, firstmatch;
9644 cur = handle->zone_dh_cur;
9645 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
9649 if (xmlStrcmp(cur->name, DTD_ELEM_ROOTZPOOL) != 0)
9656 zonecfg_fetch_rootzpool_storage(handle, cur, &temp_rzptab)
9661 firstmatch = cur;
9675 firstmatch = cur;
9685 cur = firstmatch;
9686 if ((err = zonecfg_fetch_rootzpool_storage(handle, cur,
9690 if (fetchprop(handle, cur, DTD_ATTR_INSTALL_SIZE,
9701 xmlNodePtr cur, firstmatch;
9715 cur = handle->zone_dh_cur;
9716 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
9720 if (xmlStrcmp(cur->name, DTD_ELEM_ZPOOL) != 0)
9728 zonecfg_fetch_zpool_storage(handle, cur,
9733 firstmatch = cur;
9741 (fetchprop(handle, cur, DTD_ATTR_NAME, name, sizeof (name))
9743 firstmatch = cur;
9753 firstmatch = cur;
9763 cur = firstmatch;
9764 if ((err = zonecfg_fetch_zpool_storage(handle, cur, tabptr)) != Z_OK)
9766 if ((err = fetchprop(handle, cur, DTD_ATTR_NAME, tabptr->zone_zp_name,
9770 if (fetchprop(handle, cur, DTD_ATTR_INSTALL_SIZE,
9786 xmlNodePtr cur = handle->zone_dh_cur;
9788 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
9789 if (xmlStrcmp(cur->name, DTD_ELEM_ROOTZPOOL))
9792 xmlUnlinkNode(cur);
9793 xmlFreeNode(cur);
9819 xmlNodePtr cur = handle->zone_dh_cur;
9821 for (cur = cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
9822 if (xmlStrcmp(cur->name, DTD_ELEM_ZPOOL))
9824 if (match_prop(handle, cur, DTD_ATTR_NAME,
9826 xmlUnlinkNode(cur);
9827 xmlFreeNode(cur);
9855 xmlNodePtr cur;
9861 cur = find_elem_node(handle, DTD_ELEM_ROOTZPOOL);
9862 if (cur == NULL) {
9868 cur, tabptr)) != Z_OK) {
9873 if (fetchprop(handle, cur, DTD_ATTR_INSTALL_SIZE,
9878 handle->zone_dh_cur = cur->next;
9897 xmlNodePtr cur;
9903 cur = find_elem_node(handle, DTD_ELEM_ZPOOL);
9904 if (cur == NULL) {
9909 if ((err = zonecfg_fetch_zpool_storage(handle, cur, tabptr)) != Z_OK) {
9913 if ((err = fetchprop(handle, cur, DTD_ATTR_NAME, tabptr->zone_zp_name,
9919 if (fetchprop(handle, cur, DTD_ATTR_INSTALL_SIZE,
9924 handle->zone_dh_cur = cur->next;
9938 xmlNodePtr cur = handle->zone_dh_cur;
9942 if ((err = newres(handle, cur, &newnode,
9974 xmlNodePtr cur = handle->zone_dh_cur;
9978 if ((err = newres(handle, cur, &newnode, DTD_ELEM_ZPOOL)) != Z_OK)