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.
What does it do and where is it documented?
check out the sprintf man page. it is stated :
%r Displays an integer using the current DDB radix. This non-standard interpretation of %r is only available to db_printf().
here are more informations about DDB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With