diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-19 21:31:38 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-19 21:31:38 -0400 |
commit | d1bafb75630db5cc07825e53f28a241c2005b43b (patch) | |
tree | 41c8d691434d28cd3672a403169c1adf1e64fc8b /sys/dev/vcons | |
parent | f985907ae497b836b53d932232e3cf6daac9c678 (diff) |
kernel: vcons: Add vcons_putstr() routine
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/dev/vcons')
-rw-r--r-- | sys/dev/vcons/vcons.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/dev/vcons/vcons.c b/sys/dev/vcons/vcons.c index 91ea906..cba0b85 100644 --- a/sys/dev/vcons/vcons.c +++ b/sys/dev/vcons/vcons.c @@ -197,6 +197,25 @@ vcons_putch(struct vcons_screen *scr, char c) return 0; } +/* + * Write out a string on the console. + * + * @s: String to write. + */ +int +vcons_putstr(struct vcons_screen *scr, const char *s) +{ + int status; + + while (*s != '\0') { + if ((status = vcons_putch(scr, *(s++))) != 0) { + return status; + } + } + + return 0; +} + void vcons_attach(struct vcons_screen *scr) { |