Documentation/translations/zh_CN/core-api/printk-formats.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/core-api/printk-formats.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/core-api/printk-formats.rst- Extension
.rst- Size
- 16597 bytes
- Lines
- 598
- 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.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct va_format
Annotated Snippet
struct va_format {
const char *fmt;
va_list *va;
};
实现 "递归vsnprintf"。
如果没有一些机制来验证格式字符串和va_list参数的正确性,请不要使用这个功能。
通过引用传递。
设备树节点
----------
::
%pOF[fnpPcCF]
用于打印设备树节点结构。默认行为相当于%pOFf。
- f - 设备节点全称
- n - 设备节点名
- p - 设备节点句柄
- P - 设备节点路径规范(名称+@单位)
- F - 设备节点标志
- c - 主要兼容字符串
- C - 全兼容字符串
当使用多个参数时,分隔符是':'。
例如
::
%pOF /foo/bar@0 - Node full name
%pOFf /foo/bar@0 - Same as above
%pOFfp /foo/bar@0:10 - Node full name + phandle
%pOFfcF /foo/bar@0:foo,device:--P- - Node full name +
major compatible string +
node flags
D - dynamic
d - detached
P - Populated
B - Populated bus
通过引用传递。
Fwnode handles
--------------
::
%pfw[fP]
用于打印fwnode_handles的消息。默认情况下是打印完整的节点名称,包括路径。
这些修饰符在功能上等同于上面的%pOF。
- f - 节点的全名,包括路径。
- P - 节点名称,包括地址(如果有的话)。
例如 (ACPI)
::
%pfwf \_SB.PCI0.CIO2.port@1.endpoint@0 - Full node name
%pfwP endpoint@0 - Node name
例如 (OF)
Annotation
- Detected declarations: `struct va_format`.
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.