Lines Matching +full:0 +full:xbc

40  * Extra Boot Config (XBC) is given as tree-structured ascii text of
91 * Return 0 if the boot config is initialized, or return -ENODEV.
102 return 0; in xbc_get_info()
128 * xbc_node_index() - Get the index of XBC node
131 * Return the index number of @node in XBC node list.
135 return node - &xbc_nodes[0]; in xbc_node_index()
139 * xbc_node_get_parent() - Get the parent XBC node
140 * @node: An XBC node.
151 * xbc_node_get_child() - Get the child XBC node
152 * @node: An XBC node.
163 * xbc_node_get_next() - Get the next sibling XBC node
164 * @node: An XBC node.
177 * xbc_node_get_data() - Get the data of XBC node
178 * @node: An XBC node.
205 else if (*p != '\0') in xbc_node_match_prefix()
214 * @parent: An XBC node.
234 else if (*key != '\0') in xbc_node_find_subkey()
245 * @parent: An XBC node.
247 * @vnode: A container pointer of found XBC node.
254 * Note that this returns 0-length string and stores NULL in *@vnode if the
278 * xbc_node_compose_key_after() - Compose partial key string of the XBC node
279 * @root: Root XBC node
280 * @node: Target XBC node.
298 int depth = 0, ret = 0, total = 0; in xbc_node_compose_key_after()
315 while (--depth >= 0) { in xbc_node_compose_key_after()
319 if (ret < 0) in xbc_node_compose_key_after()
322 size = 0; in xbc_node_compose_key_after()
335 * @root: An XBC root node
336 * @node: An XBC node which starts from.
385 * @root: An XBC root node
386 * @leaf: A container pointer of XBC node which starts from.
391 * Note that this returns 0-length string if the key has no value, or
410 /* XBC parse and tree build */
420 node->child = 0; in xbc_init_node()
421 node->next = 0; in xbc_init_node()
423 return 0; in xbc_init_node()
434 if (xbc_init_node(node, data, flag) < 0) in xbc_add_node()
505 if (key[0] == '\0') in xbc_valid_keyword()
511 return *key == '\0'; in xbc_valid_keyword()
541 return 0; in __xbc_open_brace()
547 if (!last_parent || brace_index < 0 || in __xbc_close_brace()
551 if (brace_index == 0) in __xbc_close_brace()
556 return 0; in __xbc_close_brace()
566 int c, quotes = 0; in __xbc_parse_value()
584 quotes = 0; in __xbc_parse_value()
585 *p++ = '\0'; in __xbc_parse_value()
595 *p++ = '\0'; in __xbc_parse_value()
616 int c = 0; in xbc_parse_array()
623 if (c < 0) in xbc_parse_array()
631 node->child = 0; in xbc_parse_array()
654 if (unlikely(xbc_node_num == 0)) in __xbc_add_key()
675 return 0; in __xbc_add_key()
685 *p++ = '\0'; in __xbc_parse_keys()
707 if (c < 0) in xbc_parse_kv()
731 if (c < 0) in xbc_parse_kv()
739 if (ret < 0) in xbc_parse_kv()
745 return 0; in xbc_parse_kv()
754 if (**k != '\0') { in xbc_parse_key()
762 return 0; in xbc_parse_key()
802 if (xbc_node_num == 0) { in xbc_verify_tree()
807 for (i = 0; i < xbc_node_num; i++) { in xbc_verify_tree()
815 n = &xbc_nodes[0]; in xbc_verify_tree()
817 len = 0; in xbc_verify_tree()
848 return 0; in xbc_verify_tree()
855 int ret = 0, c; in xbc_parse_tree()
863 if (*p != '\0') in xbc_parse_tree()
869 *q++ = '\0'; in xbc_parse_tree()
915 xbc_data_size = 0; in _xbc_exit()
916 xbc_node_num = 0; in _xbc_exit()
919 brace_index = 0; in _xbc_exit()
923 * xbc_init() - Parse given XBC file and build XBC internal tree
931 * Return the number of stored nodes (>0) if succeeded, or -errno
949 if (size > XBC_DATA_MAX || size == 0) { in xbc_init()
963 xbc_data[size] = '\0'; in xbc_init()
973 memset(xbc_nodes, 0, sizeof(struct xbc_node) * XBC_NODE_MAX); in xbc_init()
979 if (ret < 0) { in xbc_init()