Lines Matching +full:0 +full:xbc

38  * Extra Boot Config (XBC) is given as tree-structured ascii text of
89 * Return 0 if the boot config is initialized, or return -ENODEV.
100 return 0; in xbc_get_info()
126 * xbc_node_index() - Get the index of XBC node
129 * Return the index number of @node in XBC node list.
133 return node - &xbc_nodes[0]; in xbc_node_index()
137 * xbc_node_get_parent() - Get the parent XBC node
138 * @node: An XBC node.
149 * xbc_node_get_child() - Get the child XBC node
150 * @node: An XBC node.
161 * xbc_node_get_next() - Get the next sibling XBC node
162 * @node: An XBC node.
175 * xbc_node_get_data() - Get the data of XBC node
176 * @node: An XBC node.
203 else if (*p != '\0') in xbc_node_match_prefix()
212 * @parent: An XBC node.
232 else if (*key != '\0') in xbc_node_find_subkey()
243 * @parent: An XBC node.
245 * @vnode: A container pointer of found XBC node.
252 * Note that this returns 0-length string and stores NULL in *@vnode if the
276 * xbc_node_compose_key_after() - Compose partial key string of the XBC node
277 * @root: Root XBC node
278 * @node: Target XBC node.
296 int depth = 0, ret = 0, total = 0; in xbc_node_compose_key_after()
313 while (--depth >= 0) { in xbc_node_compose_key_after()
317 if (ret < 0) in xbc_node_compose_key_after()
320 size = 0; in xbc_node_compose_key_after()
333 * @root: An XBC root node
334 * @node: An XBC node which starts from.
383 * @root: An XBC root node
384 * @leaf: A container pointer of XBC node which starts from.
389 * Note that this returns 0-length string if the key has no value, or
408 /* XBC parse and tree build */
418 node->child = 0; in xbc_init_node()
419 node->next = 0; in xbc_init_node()
421 return 0; in xbc_init_node()
432 if (xbc_init_node(node, data, flag) < 0) in xbc_add_node()
503 if (key[0] == '\0') in xbc_valid_keyword()
509 return *key == '\0'; in xbc_valid_keyword()
539 return 0; in __xbc_open_brace()
545 if (!last_parent || brace_index < 0 || in __xbc_close_brace()
549 if (brace_index == 0) in __xbc_close_brace()
554 return 0; in __xbc_close_brace()
564 int c, quotes = 0; in __xbc_parse_value()
582 quotes = 0; in __xbc_parse_value()
583 *p++ = '\0'; in __xbc_parse_value()
593 *p++ = '\0'; in __xbc_parse_value()
614 int c = 0; in xbc_parse_array()
621 if (c < 0) in xbc_parse_array()
629 node->child = 0; in xbc_parse_array()
652 if (unlikely(xbc_node_num == 0)) in __xbc_add_key()
673 return 0; in __xbc_add_key()
683 *p++ = '\0'; in __xbc_parse_keys()
705 if (c < 0) in xbc_parse_kv()
729 if (c < 0) in xbc_parse_kv()
737 if (ret < 0) in xbc_parse_kv()
743 return 0; in xbc_parse_kv()
752 if (**k != '\0') { in xbc_parse_key()
760 return 0; in xbc_parse_key()
800 if (xbc_node_num == 0) { in xbc_verify_tree()
805 for (i = 0; i < xbc_node_num; i++) { in xbc_verify_tree()
813 n = &xbc_nodes[0]; in xbc_verify_tree()
815 len = 0; in xbc_verify_tree()
846 return 0; in xbc_verify_tree()
853 int ret = 0, c; in xbc_parse_tree()
861 if (*p != '\0') in xbc_parse_tree()
867 *q++ = '\0'; in xbc_parse_tree()
913 xbc_data_size = 0; in _xbc_exit()
914 xbc_node_num = 0; in _xbc_exit()
917 brace_index = 0; in _xbc_exit()
921 * xbc_init() - Parse given XBC file and build XBC internal tree
929 * Return the number of stored nodes (>0) if succeeded, or -errno
947 if (size > XBC_DATA_MAX || size == 0) { in xbc_init()
961 xbc_data[size] = '\0'; in xbc_init()
971 memset(xbc_nodes, 0, sizeof(struct xbc_node) * XBC_NODE_MAX); in xbc_init()
977 if (ret < 0) { in xbc_init()