Lines Matching +full:0 +full:xbc
19 * Extra Boot Config (XBC) is given as tree-structured ascii text of
60 * xbc_node_index() - Get the index of XBC node
63 * Return the index number of @node in XBC node list.
67 return node - &xbc_nodes[0]; in xbc_node_index()
71 * xbc_node_get_parent() - Get the parent XBC node
72 * @node: An XBC node.
83 * xbc_node_get_child() - Get the child XBC node
84 * @node: An XBC node.
95 * xbc_node_get_next() - Get the next sibling XBC node
96 * @node: An XBC node.
109 * xbc_node_get_data() - Get the data of XBC node
110 * @node: An XBC node.
137 else if (*p != '\0') in xbc_node_match_prefix()
146 * @parent: An XBC node.
166 else if (*key != '\0') in xbc_node_find_child()
177 * @parent: An XBC node.
179 * @vnode: A container pointer of found XBC node.
186 * Note that this returns 0-length string and stores NULL in *@vnode if the
210 * xbc_node_compose_key_after() - Compose partial key string of the XBC node
211 * @root: Root XBC node
212 * @node: Target XBC node.
230 int depth = 0, ret = 0, total = 0; in xbc_node_compose_key_after()
247 while (--depth >= 0) { in xbc_node_compose_key_after()
251 if (ret < 0) in xbc_node_compose_key_after()
254 size = 0; in xbc_node_compose_key_after()
267 * @root: An XBC root node
268 * @node: An XBC node which starts from.
307 * @root: An XBC root node
308 * @leaf: A container pointer of XBC node which starts from.
313 * Note that this returns 0-length string if the key has no value, or
332 /* XBC parse and tree build */
342 node->child = 0; in xbc_init_node()
343 node->next = 0; in xbc_init_node()
345 return 0; in xbc_init_node()
356 if (xbc_init_node(node, data, flag) < 0) in xbc_add_node()
407 if (key[0] == '\0') in xbc_valid_keyword()
413 return *key == '\0'; in xbc_valid_keyword()
443 return 0; in __xbc_open_brace()
449 if (!last_parent || brace_index < 0 || in __xbc_close_brace()
453 if (brace_index == 0) in __xbc_close_brace()
458 return 0; in __xbc_close_brace()
468 int c, quotes = 0; in __xbc_parse_value()
486 quotes = 0; in __xbc_parse_value()
487 *p++ = '\0'; in __xbc_parse_value()
497 *p++ = '\0'; in __xbc_parse_value()
518 int c = 0; in xbc_parse_array()
522 if (c < 0) in xbc_parse_array()
530 node->next = 0; in xbc_parse_array()
553 if (unlikely(xbc_node_num == 0)) in __xbc_add_key()
573 return 0; in __xbc_add_key()
583 *p++ = '\0'; in __xbc_parse_keys()
613 if (c < 0) in xbc_parse_kv()
623 if (c < 0) in xbc_parse_kv()
631 if (ret < 0) in xbc_parse_kv()
637 return 0; in xbc_parse_kv()
646 if (**k != '\0') { in xbc_parse_key()
654 return 0; in xbc_parse_key()
694 if (xbc_node_num == 0) { in xbc_verify_tree()
699 for (i = 0; i < xbc_node_num; i++) { in xbc_verify_tree()
707 n = &xbc_nodes[0]; in xbc_verify_tree()
709 len = 0; in xbc_verify_tree()
740 return 0; in xbc_verify_tree()
753 xbc_data_size = 0; in xbc_destroy_all()
754 xbc_node_num = 0; in xbc_destroy_all()
757 brace_index = 0; in xbc_destroy_all()
761 * xbc_init() - Parse given XBC file and build XBC internal tree
768 * Return the number of stored nodes (>0) if succeeded, or -errno
789 if (ret > XBC_DATA_MAX - 1 || ret == 0) { in xbc_init()
803 memset(xbc_nodes, 0, sizeof(struct xbc_node) * XBC_NODE_MAX); in xbc_init()
813 if (*p != '\0') in xbc_init()
819 *q++ = '\0'; in xbc_init()
853 if (ret < 0) { in xbc_init()
866 * xbc_debug_dump() - Dump current XBC node list
868 * Dump the current XBC node list on printk buffer for debug.
874 for (i = 0; i < xbc_node_num; i++) { in xbc_debug_dump()