From 9223644a022f1e7d61eb1323a89f586e732075a9 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 4 Jun 2008 18:37:29 +0000 Subject: [PATCH] Add a welcome message including the revision number when initializing the syslog so syslogs always contain the revision number too (as does serial output). This is only necessary because the early part of the serial output (that contains the revision number) does not make it into the syslog. So fixing that might be the better way. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25804 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/debug/debug.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/system/kernel/debug/debug.cpp b/src/system/kernel/debug/debug.cpp index 4fe7df3099..b6a68ee861 100644 --- a/src/system/kernel/debug/debug.cpp +++ b/src/system/kernel/debug/debug.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -832,6 +833,7 @@ static status_t syslog_init(struct kernel_args *args) { status_t status; + int32 length = 0; if (!sSyslogOutputEnabled) return B_OK; @@ -858,6 +860,11 @@ syslog_init(struct kernel_args *args) if (args->debug_output != NULL) syslog_write((const char*)args->debug_output, args->debug_size); + char revisionBuffer[64]; + length = snprintf(revisionBuffer, sizeof(revisionBuffer), + "Welcome to syslog debug output!\nHaiku revision: %lu\n", + get_haiku_revision()); + syslog_write(revisionBuffer, length); return B_OK; err3: