B_SAFEMODE_DISABLE_USER_ADD_ONS is also a safe mode we now honor

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25327 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2008-05-06 21:07:21 +00:00
parent 5142c2ac86
commit cea151dc3e
2 changed files with 16 additions and 2 deletions

View File

@ -10,6 +10,8 @@
#include "kb_mouse_driver.h"
#include "MethodReplicant.h"
#include <safemode.h>
#include <AppServerLink.h>
#include <MessagePrivate.h>
@ -25,7 +27,6 @@
#include <Path.h>
#include <Roster.h>
#include <String.h>
#include <driver_settings.h>
#include <stdio.h>
@ -163,6 +164,19 @@ InputServer::InputServer()
fSafeMode = true;
}
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
if (_kern_get_safemode_option(B_SAFEMODE_DISABLE_USER_ADD_ONS, parameter, &parameterLength) == B_OK)
#else
if (_kget_safemode_option_(B_SAFEMODE_DISABLE_USER_ADD_ONS, parameter, &parameterLength) == B_OK)
#endif
{
if (!strcasecmp(parameter, "enabled") || !strcasecmp(parameter, "on")
|| !strcasecmp(parameter, "true") || !strcasecmp(parameter, "yes")
|| !strcasecmp(parameter, "enable") || !strcmp(parameter, "1"))
fSafeMode = true;
}
gDeviceManager.LoadState();
#ifndef HAIKU_TARGET_PLATFORM_HAIKU

View File

@ -30,7 +30,7 @@ SEARCH on US-International.keymap
AddResources input_server : input_server.rdef ;
UsePrivateHeaders app input interface shared storage ;
UsePrivateHeaders app input interface kernel shared storage ;
SubDirC++Flags -DADD_ON_STABLE_SECONDS=1 ; # for AddOnMonitorHandler.cpp