p在printk格式中以%pa [p]表示的含义

闪光烧伤

问题是关于printk格式的。我正在阅读的文档位于此处

这是我要询问的摘录:

Physical addresses types phys_addr_t:

    %pa[p]  0x01234567 or 0x0123456789abcdef

    For printing a phys_addr_t type (and its derivatives, such as
    resource_size_t) which can vary based on build options, regardless of
    the width of the CPU data path. Passed by reference.

是什么[p]%pa[p]立场?这是什么意思?

x

p[p]代表phys_addr_t在使用时%pap这类似于din的in%pad立场dma_addr_t,如引用文件中所示:

DMA addresses types dma_addr_t:

    %pad    0x01234567 or 0x0123456789abcdef

    For printing a dma_addr_t type which can vary based on build options,
    regardless of the width of the CPU data path. Passed by reference.

由于它%pa之间没有提供任何书面差异%pap,因此意味着它们的行为相同。括号内的内容表示可选的修饰符。%*pE在文档后面的定义中可以看到这一点

Raw buffer as an escaped string:

    %*pE[achnops]
...
    The conversion rules are applied according to an optional combination
    of flags (see string_escape_mem() kernel documentation for the
    details):
        a - ESCAPE_ANY
        c - ESCAPE_SPECIAL
        h - ESCAPE_HEX
        n - ESCAPE_NULL
        o - ESCAPE_OCTAL
        p - ESCAPE_NP
        s - ESCAPE_SPACE
    By default ESCAPE_ANY_NP is used.

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

Related 相关文章

热门标签

归档