In several places in the kernel source code, I could find this:
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:
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) { EVENTHANDLER_REGISTER(shutdown_pre_sync, vt_window_switch, vw, SHUTDOWN_PRI_DEFAULT); } }
but if I look into the sprintf man page, I cannot find a link to the r format specifier.
What does he do and where is it documented?
source share