From f27f9f5434eac9126535bd9935e881ec500ee2c5 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 6 Apr 2024 20:24:27 -0400 Subject: init: Write some logs Signed-off-by: Ian Moffett --- usr.sbin/init/main.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'usr.sbin') diff --git a/usr.sbin/init/main.c b/usr.sbin/init/main.c index d92538a..220d819 100644 --- a/usr.sbin/init/main.c +++ b/usr.sbin/init/main.c @@ -27,8 +27,25 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include +#include + +#define VERSION "v0.0.1" + +static void +loginfo(const char *s) +{ + const char *tmp = "init [*]: "; + + write(STDOUT_FILENO, tmp, strlen(tmp)); + write(STDOUT_FILENO, s, strlen(s)); +} + int main(int argc, char **argv) { + loginfo("Hyra init " VERSION " loaded\n"); + loginfo("Hello, World!\n"); + loginfo("** EXITING 0 **\n"); return 0; } -- cgit v1.2.3