[英]What does %r mean in kernel printf formats?
In several places in the kernel source code I could find this used: 在内核源代码的几个地方我可以找到这个:
One example is 一个例子是
if (console_sc != NULL && console_sc->vtermid == sc->vtermid) {
sc->outseqno = console_sc->outseqno;
console_sc = sc;
sprintf(uart_phyp_consdev.cn_name, "ttyu%r", unit);
tty_init_console(sc->tp, 0);
}
Another example is: 另一个例子是:
if (!(vw->vw_flags & VWF_READY)) {
callout_init(&vw->vw_proc_dead_timer, 0);
terminal_maketty(vw->vw_terminal, "v%r", VT_UNIT(vw));
vw->vw_flags |= VWF_READY;
if (vw->vw_flags & VWF_CONSOLE) {
/* For existing console window. */
EVENTHANDLER_REGISTER(shutdown_pre_sync,
vt_window_switch, vw, SHUTDOWN_PRI_DEFAULT);
}
}
but if I look in the sprintf man page I can not find any reference to the 'r' format specifier. 但如果我查看sprintf手册页,我找不到对'r'格式说明符的任何引用。
What does it do and where is it documented? 它做了什么以及在哪里记录?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.