From e08a79330abd83e45ad23034746ac0e081ccbf3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 21 Apr 2004 22:41:00 +0000 Subject: [PATCH] Renamed systeminfo.c into system_info.c Added syscall for _kern_get_system_info(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7288 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/libroot/os/Jamfile | 2 +- src/kernel/libroot/os/syscalls.S | 1 + src/kernel/libroot/os/system_info.c | 33 +++++++++++++++++++++++++++++ src/kernel/libroot/os/systeminfo.c | 31 --------------------------- 4 files changed, 35 insertions(+), 32 deletions(-) create mode 100644 src/kernel/libroot/os/system_info.c delete mode 100644 src/kernel/libroot/os/systeminfo.c diff --git a/src/kernel/libroot/os/Jamfile b/src/kernel/libroot/os/Jamfile index c918d3f520..666c469228 100644 --- a/src/kernel/libroot/os/Jamfile +++ b/src/kernel/libroot/os/Jamfile @@ -10,7 +10,7 @@ KernelMergeObject os_main.o : <$(SOURCE_GRIST)>image.c <$(SOURCE_GRIST)>port.c <$(SOURCE_GRIST)>sem.c - <$(SOURCE_GRIST)>systeminfo.c + <$(SOURCE_GRIST)>system_info.c <$(SOURCE_GRIST)>team.c <$(SOURCE_GRIST)>thread.c <$(SOURCE_GRIST)>time.c diff --git a/src/kernel/libroot/os/syscalls.S b/src/kernel/libroot/os/syscalls.S index 04b0bdfa49..e0ab690d57 100644 --- a/src/kernel/libroot/os/syscalls.S +++ b/src/kernel/libroot/os/syscalls.S @@ -166,6 +166,7 @@ SYSCALL6(sys_sysctl, 71) SYSCALL3(sys_setenv, 79) SYSCALL2(sys_getenv, 80) SYSCALL1(_kern_debug_output, 139) +SYSCALL2(_kern_get_system_info, 140); /* atomic calls */ SYSCALL2(_kern_atomic_set, 126) diff --git a/src/kernel/libroot/os/system_info.c b/src/kernel/libroot/os/system_info.c new file mode 100644 index 0000000000..2d86d41203 --- /dev/null +++ b/src/kernel/libroot/os/system_info.c @@ -0,0 +1,33 @@ +/* +** Copyright 2002-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the OpenBeOS License. +*/ + + +#include +#include "syscalls.h" + + +status_t +_get_system_info(system_info *info, size_t size) +{ + if (info == NULL || size != sizeof(system_info)) + return B_BAD_VALUE; + + return _kern_get_system_info(info, size); +} + + +int32 +is_computer_on(void) +{ + return 1; +} + + +double +is_computer_on_fire(void) +{ + return 0; +} + diff --git a/src/kernel/libroot/os/systeminfo.c b/src/kernel/libroot/os/systeminfo.c deleted file mode 100644 index af4c55f504..0000000000 --- a/src/kernel/libroot/os/systeminfo.c +++ /dev/null @@ -1,31 +0,0 @@ -/* -** Copyright 2002, Axel Dörfler, axeld@pinc-software.de. All rights reserved. -** Distributed under the terms of the OpenBeOS License. -*/ - - -#include -#include "syscalls.h" - - -status_t -_get_system_info(system_info *returned_info, size_t size) -{ - // ToDo: _get_system_info() - return B_ERROR; -} - - -int32 -is_computer_on(void) -{ - return 1; -} - - -double -is_computer_on_fire(void) -{ - return 0; -} -