Moving the secret inside the tests, not in a library function.

This commit is contained in:
Geoffrey Challen
2015-12-31 12:03:41 -05:00
parent ff1d44b505
commit 5271fc50c7
4 changed files with 8 additions and 31 deletions

View File

@@ -149,7 +149,7 @@ tkprintf(const char *fmt, ...)
int chars;
va_list ap;
if (KERNEL_SECRET != 0) {
if (strcmp(KERNEL_SECRET, "") != 0) {
return 0;
}
@@ -160,26 +160,6 @@ tkprintf(const char *fmt, ...)
return chars;
}
/*
* kprintf variant that prints the automated secret
*/
int
skprintf(const char *fmt, ...)
{
int chars;
va_list ap;
if (KERNEL_SECRET != 0) {
kprintf("SECRET=%llu ", KERNEL_SECRET);
}
va_start(ap, fmt);
chars = vkprintf(fmt, ap);
va_end(ap);
return chars;
}
/*
* panic() is for fatal errors. It prints the printf arguments it's
* passed and then halts the system.