Compare commits

..

No commits in common. "b3c478f19eed15d63bc160cb0737e3ce65687253" and "01359af288a74e881ad601448e87866f0551da62" have entirely different histories.

3 changed files with 5 additions and 6 deletions

View File

@ -328,15 +328,13 @@ int main()
umask(022); umask(022);
g_init_log = fopen("/dev/uart0", "w"); g_init_log = fopen("/dev/uart0", "w+");
check(g_init_log);
setlinebuf(g_init_log);
fcntl(fileno(g_init_log), F_SETFD, FD_CLOEXEC); fcntl(fileno(g_init_log), F_SETFD, FD_CLOEXEC);
set_hostname(); set_hostname();
if (signal(SIGTERM, sigterm_handler) == SIG_ERR) do_log("[init] failed to register handler for SIGTERM\n"); if (signal(SIGTERM, sigterm_handler) == SIG_ERR) do_log("[init] failed to register handler for SIGTERM");
if (signal(SIGQUIT, sigquit_handler) == SIG_ERR) do_log("[init] failed to register handler for SIGQUIT\n"); if (signal(SIGQUIT, sigquit_handler) == SIG_ERR) do_log("[init] failed to register handler for SIGQUIT");
start_services(); start_services();

View File

@ -32,7 +32,7 @@ void reap_thread()
[[noreturn]] void init() [[noreturn]] void init()
{ {
kinfoln("Starting Moon %s %s", MOON_VERSION, MOON_RELEASE); kinfoln("Starting Moon %s, built on %s at %s", MOON_VERSION, __DATE__, __TIME__);
// Default hostname if nobody from userspace changes it // Default hostname if nobody from userspace changes it
set_host_name("moon"_sv); set_host_name("moon"_sv);

View File

@ -25,6 +25,7 @@ Result<u64> sys_uname(Registers*, SyscallArgs args)
strncpy(result.nodename, s_hostname.chars(), _UTSNAME_LENGTH); strncpy(result.nodename, s_hostname.chars(), _UTSNAME_LENGTH);
strncpy(result.release, MOON_VERSION, _UTSNAME_LENGTH); strncpy(result.release, MOON_VERSION, _UTSNAME_LENGTH);
// FIXME: Hardcode this at build time instead of in code (should be the short commit hash).
strncpy(result.version, MOON_RELEASE, _UTSNAME_LENGTH); strncpy(result.version, MOON_RELEASE, _UTSNAME_LENGTH);
strncpy(result.machine, CPU::platform_string().chars(), _UTSNAME_LENGTH); strncpy(result.machine, CPU::platform_string().chars(), _UTSNAME_LENGTH);