Added empty get_safemode_option() call - right now, it's even private
and only the syscall is exported. For now, it always returns B_ENTRY_NOT_FOUND - since the boot loader does not have support for driver settings yet. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10237 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -16,6 +16,7 @@ KernelMergeObject kernel_device_manager.o :
|
||||
registration.c
|
||||
root_node.c
|
||||
scan.c
|
||||
settings.cpp
|
||||
:
|
||||
-fno-pic -Wno-unused -D_KERNEL_MODE
|
||||
;
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <kernel.h>
|
||||
#include <syscalls.h>
|
||||
|
||||
|
||||
static status_t
|
||||
get_safemode_option(const char *parameter, char *buffer, size_t *_bufferSize)
|
||||
{
|
||||
// ToDo: implement me for real!
|
||||
// We could also think about making this available in the kernel (by making it non-static)
|
||||
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
extern "C" status_t
|
||||
_user_get_safemode_option(const char *userParameter, char *userBuffer, size_t *_userBufferSize)
|
||||
{
|
||||
char parameter[B_FILE_NAME_LENGTH];
|
||||
char buffer[B_PATH_NAME_LENGTH];
|
||||
size_t bufferSize;
|
||||
|
||||
if (!IS_USER_ADDRESS(userParameter) || !IS_USER_ADDRESS(userBuffer)
|
||||
|| !IS_USER_ADDRESS(_userBufferSize)
|
||||
|| user_memcpy(&bufferSize, _userBufferSize, sizeof(size_t)) < B_OK
|
||||
|| user_strlcpy(parameter, userParameter, B_FILE_NAME_LENGTH) < B_OK)
|
||||
return B_BAD_ADDRESS;
|
||||
|
||||
if (bufferSize > B_PATH_NAME_LENGTH)
|
||||
bufferSize = B_PATH_NAME_LENGTH;
|
||||
|
||||
status_t status = get_safemode_option(parameter, buffer, &bufferSize);
|
||||
|
||||
if (user_strlcpy(userBuffer, buffer, bufferSize) < B_OK
|
||||
|| user_memcpy(_userBufferSize, &bufferSize, sizeof(size_t)) < B_OK)
|
||||
return B_BAD_ADDRESS;
|
||||
|
||||
return status;
|
||||
}
|
||||
Reference in New Issue
Block a user