Make the branding system more neutral.
This commit is contained in:
parent
264805a4aa
commit
1ca1a068a1
|
@ -17,6 +17,7 @@
|
||||||
* System calls for managing the hostname of the current system.
|
* System calls for managing the hostname of the current system.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <brand.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,7 @@ extern "C" void KernelInit(unsigned long magic, multiboot_info_t* bootinfo_p)
|
||||||
|
|
||||||
// Display the logo.
|
// Display the logo.
|
||||||
Log::PrintF("\e[37;41m\e[2J");
|
Log::PrintF("\e[37;41m\e[2J");
|
||||||
Log::Center(BRAND_MAXSI);
|
Log::Center(BRAND_LOGO);
|
||||||
|
|
||||||
#if defined(__x86_64__)
|
#if defined(__x86_64__)
|
||||||
// TODO: Remove this hack when qemu 1.4.x and 1.5.0 are obsolete.
|
// TODO: Remove this hack when qemu 1.4.x and 1.5.0 are obsolete.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, 2013 Jonas 'Sortie' Termansen.
|
* Copyright (c) 2011, 2014, 2013, 2014, 2015, 2016 Jonas 'Sortie' Termansen.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -110,7 +110,7 @@ void PanicInit()
|
||||||
if ( longpanic )
|
if ( longpanic )
|
||||||
{
|
{
|
||||||
Log::Print("\e[m\e[31;40m\e[2J\e[H");
|
Log::Print("\e[m\e[31;40m\e[2J\e[H");
|
||||||
Log::Center(BRAND_MAXSI_DEAD);
|
Log::Center(BRAND_LOGO_PANIC);
|
||||||
Log::Center("KERNEL PANIC");
|
Log::Center("KERNEL PANIC");
|
||||||
Log::Print("\n\nThe operating system encountered an unrecoverable "
|
Log::Print("\n\nThe operating system encountered an unrecoverable "
|
||||||
"error.\n\nTechincal information:\n");
|
"error.\n\nTechincal information:\n");
|
||||||
|
|
|
@ -26,7 +26,7 @@ void* dlopen(const char* filename, int mode)
|
||||||
{
|
{
|
||||||
(void) filename;
|
(void) filename;
|
||||||
(void) mode;
|
(void) mode;
|
||||||
dlerrormsg = "Sortix does not yet support dynamic linking";
|
dlerrormsg = "Dynamic linking is not implemented";
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ void* dlsym(void* handle, const char* name)
|
||||||
{
|
{
|
||||||
(void) handle;
|
(void) handle;
|
||||||
(void) name;
|
(void) name;
|
||||||
dlerrormsg = "Sortix does not yet support dynamic linking";
|
dlerrormsg = "Dynamic linking is not implemented";
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,14 @@
|
||||||
#ifndef INCLUDE_BRAND_H
|
#ifndef INCLUDE_BRAND_H
|
||||||
#define INCLUDE_BRAND_H
|
#define INCLUDE_BRAND_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The name 'Sortix' and the Sortix Logo are reserved for use by the official
|
||||||
|
* Sortix project. If you publish modified versions of this operating system,
|
||||||
|
* first edit this file to make no use of the 'Sortix' name and the Sortix logo
|
||||||
|
* in its definitions, then rebuild the whole operating system and ports to
|
||||||
|
* change the branding.
|
||||||
|
*/
|
||||||
|
|
||||||
/* The name of the distribution of the operation system. */
|
/* The name of the distribution of the operation system. */
|
||||||
#define BRAND_DISTRIBUTION_NAME "Sortix"
|
#define BRAND_DISTRIBUTION_NAME "Sortix"
|
||||||
|
|
||||||
|
@ -32,11 +40,14 @@
|
||||||
/* The name of the kernel. */
|
/* The name of the kernel. */
|
||||||
#define BRAND_KERNEL_NAME "Sortix"
|
#define BRAND_KERNEL_NAME "Sortix"
|
||||||
|
|
||||||
|
/* The default hostname. */
|
||||||
|
#define BRAND_DEFAULT_HOSTNAME "sortix"
|
||||||
|
|
||||||
/* The tagline of this release. */
|
/* The tagline of this release. */
|
||||||
#define BRAND_RELEASE_TAGLINE "\"I'd like to add you to my professional Sortix network\""
|
#define BRAND_RELEASE_TAGLINE "\"I'd like to add you to my professional Sortix network\""
|
||||||
|
|
||||||
/* Ascii version of the maxsi logo. */
|
/* The operating system logo as ascii art. */
|
||||||
#define BRAND_MAXSI \
|
#define BRAND_LOGO \
|
||||||
" _ \n" \
|
" _ \n" \
|
||||||
" / \\ \n" \
|
" / \\ \n" \
|
||||||
" /\\ /\\ / \\\n" \
|
" /\\ /\\ / \\\n" \
|
||||||
|
@ -53,8 +64,8 @@
|
||||||
" /_____________\\ /____________\\ \n" \
|
" /_____________\\ /____________\\ \n" \
|
||||||
" \n" \
|
" \n" \
|
||||||
|
|
||||||
/* Dead version of the maxsi logo, used for panic screens and such. */
|
/* The operating system logo for panic screens. */
|
||||||
#define BRAND_MAXSI_DEAD \
|
#define BRAND_LOGO_PANIC \
|
||||||
" _ \n" \
|
" _ \n" \
|
||||||
" / \\ \n" \
|
" / \\ \n" \
|
||||||
" /\\ /\\ / \\\n" \
|
" /\\ /\\ / \\\n" \
|
||||||
|
@ -71,21 +82,4 @@
|
||||||
" /_____________\\ /____________\\ \n" \
|
" /_____________\\ /____________\\ \n" \
|
||||||
" \n" \
|
" \n" \
|
||||||
|
|
||||||
/* Message printed when a critical error occurs and the system panics. */
|
|
||||||
#define BRAND_PANIC_LONG \
|
|
||||||
"\e[m\e[31;40m\e[2J\e[H" \
|
|
||||||
BRAND_MAXSI_DEAD \
|
|
||||||
" \n" \
|
|
||||||
" RED MAXSI OF DEATH \n" \
|
|
||||||
" \n" \
|
|
||||||
"A critical error occured within the kernel of the operating system and it has\n" \
|
|
||||||
"forcefully shut down as a last resort.\n" \
|
|
||||||
"\n" \
|
|
||||||
"Technical information:\n" \
|
|
||||||
|
|
||||||
/* Short version of the panic version that consumes minimal space. */
|
|
||||||
#define BRAND_PANIC_SHORT \
|
|
||||||
"\e[m\e[31m\e[0J" \
|
|
||||||
"RED MAXSI OF DEATH\n" \
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -222,7 +222,7 @@ static char* brand_line()
|
||||||
kernelinfo("version", version, sizeof(version));
|
kernelinfo("version", version, sizeof(version));
|
||||||
char* result = NULL;
|
char* result = NULL;
|
||||||
asprintf(&result, "%s %s - %s",
|
asprintf(&result, "%s %s - %s",
|
||||||
BRAND_OPERATING_SYSTEM_NAME,
|
BRAND_DISTRIBUTION_NAME,
|
||||||
version,
|
version,
|
||||||
BRAND_DISTRIBUTION_WEBSITE);
|
BRAND_DISTRIBUTION_WEBSITE);
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue