Use `shell_api.h` and the buffer structure in `shell` and `libshell` to avoid magic numbers and sync Reviewed-on: #657 Reviewed-by: Burer <burer@kolibrios.org> Co-authored-by: Egor00f <y.yarin@inbox.ru>
13 lines
276 B
C
13 lines
276 B
C
#include <shell_api.h>
|
|
#include <stdio.h>
|
|
|
|
void shell_printf(const char *format, ...)
|
|
{
|
|
va_list ap;
|
|
va_start(ap, format);
|
|
vsnprintf(__shell_shm->data, sizeof(__shell_shm->data), format, ap);
|
|
__shell_shm->cmd = SHELL_PUTS;
|
|
va_end(ap);
|
|
__SHELL_WAIT();
|
|
}
|