Documentation/translations/zh_CN/admin-guide/bootconfig.rst

Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/admin-guide/bootconfig.rst

File Facts

System
Linux kernel
Corpus path
Documentation/translations/zh_CN/admin-guide/bootconfig.rst
Extension
.rst
Size
9687 bytes
Lines
294
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

xbc_array_for_each_value(vnode, value) {
      printk("%s ", value);
    }

如果您想查找具有前缀字符串的键,可以使用 xbc_find_node() 通过前缀字符串查找
节点,然后用 xbc_node_for_each_key_value() 迭代前缀节点下的键。

但最典型的用法是获取前缀下的命名值或前缀下的命名数组,例如::

 root = xbc_find_node("key.prefix");
 value = xbc_node_find_value(root, "option", &vnode);
 ...
 xbc_node_for_each_array_value(root, "array-option", value, anode) {
    ...
 }

这将访问值“key.prefix.option”的值和“key.prefix.array-option”的数组。

锁是不需要的,因为在初始化之后配置只读。如果需要修改,必须复制所有数据和关键字。


函数与结构体
============

相关定义的kernel-doc参见:

 - include/linux/bootconfig.h
 - lib/bootconfig.c

Annotation

Implementation Notes