mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 11:16:47 +00:00
🆕 vsprintk
This commit is contained in:
parent
4c9719f477
commit
594aeadf65
@ -891,3 +891,15 @@ void printk_disable_animation()
|
||||
{
|
||||
sw_show_scroll_animation = false;
|
||||
}
|
||||
|
||||
int sprintk(char *buf, const char *fmt, ...)
|
||||
{
|
||||
int count = 0;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
count = vsprintf(buf, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
return count;
|
||||
}
|
@ -157,3 +157,13 @@ void printk_enable_animation();
|
||||
*
|
||||
*/
|
||||
void printk_disable_animation();
|
||||
|
||||
/**
|
||||
* @brief 格式化字符串并输出到buf
|
||||
*
|
||||
* @param buf 输出缓冲区
|
||||
* @param fmt 格式
|
||||
* @param ... 参数
|
||||
* @return int 字符串长度
|
||||
*/
|
||||
int sprintk(char *buf, const char *fmt, ...);
|
||||
|
Loading…
x
Reference in New Issue
Block a user