Added "Disable IDE DMA" safemode option.
MenuItem::SetData() now asks for a const parameter. The safemode menu options now set their MenuItem::Data() to the safemode option string. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12191 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2004-2005, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
** Distributed under the terms of the Haiku License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef KERNEL_BOOT_MENU_H
|
#ifndef KERNEL_BOOT_MENU_H
|
||||||
#define KERNEL_BOOT_MENU_H
|
#define KERNEL_BOOT_MENU_H
|
||||||
@@ -43,8 +43,8 @@ class MenuItem : public DoublyLinkedListLinkImpl<MenuItem> {
|
|||||||
void SetType(menu_item_type type);
|
void SetType(menu_item_type type);
|
||||||
menu_item_type Type() const { return fType; }
|
menu_item_type Type() const { return fType; }
|
||||||
|
|
||||||
void SetData(void *data);
|
void SetData(const void *data);
|
||||||
void *Data() const { return fData; }
|
const void *Data() const { return fData; }
|
||||||
|
|
||||||
void SetHelpText(const char *text);
|
void SetHelpText(const char *text);
|
||||||
const char *HelpText() const { return fHelpText; }
|
const char *HelpText() const { return fHelpText; }
|
||||||
@@ -63,7 +63,7 @@ class MenuItem : public DoublyLinkedListLinkImpl<MenuItem> {
|
|||||||
bool fIsEnabled;
|
bool fIsEnabled;
|
||||||
menu_item_type fType;
|
menu_item_type fType;
|
||||||
Menu *fMenu, *fSubMenu;
|
Menu *fMenu, *fSubMenu;
|
||||||
void *fData;
|
const void *fData;
|
||||||
const char *fHelpText;
|
const char *fHelpText;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2003-2004, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2003-2005, Axel Dörfler, [email protected]. All rights reserved.
|
||||||
** Distributed under the terms of the Haiku License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
#include <boot/vfs.h>
|
#include <boot/vfs.h>
|
||||||
#include <boot/platform.h>
|
#include <boot/platform.h>
|
||||||
#include <boot/stdio.h>
|
#include <boot/stdio.h>
|
||||||
|
#include <safemode.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -109,7 +110,7 @@ MenuItem::SetEnabled(bool enabled)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MenuItem::SetData(void *data)
|
MenuItem::SetData(const void *data)
|
||||||
{
|
{
|
||||||
fData = data;
|
fData = data;
|
||||||
}
|
}
|
||||||
@@ -404,8 +405,13 @@ add_safe_mode_menu()
|
|||||||
MenuItem *item;
|
MenuItem *item;
|
||||||
|
|
||||||
safeMenu->AddItem(item = new MenuItem("Safe mode"));
|
safeMenu->AddItem(item = new MenuItem("Safe mode"));
|
||||||
|
item->SetData(B_SAFEMODE_SAFE_MODE);
|
||||||
item->SetType(MENU_ITEM_MARKABLE);
|
item->SetType(MENU_ITEM_MARKABLE);
|
||||||
safeMenu->AddItem(item = new MenuItem("Disable user add-ons"));
|
safeMenu->AddItem(item = new MenuItem("Disable user add-ons"));
|
||||||
|
item->SetData(B_SAFEMODE_DISABLE_USER_ADD_ONS);
|
||||||
|
item->SetType(MENU_ITEM_MARKABLE);
|
||||||
|
safeMenu->AddItem(item = new MenuItem("Disable IDE DMA"));
|
||||||
|
item->SetData(B_SAFEMODE_DISABLE_IDE_DMA);
|
||||||
item->SetType(MENU_ITEM_MARKABLE);
|
item->SetType(MENU_ITEM_MARKABLE);
|
||||||
|
|
||||||
platform_add_menus(safeMenu);
|
platform_add_menus(safeMenu);
|
||||||
|
|||||||
Reference in New Issue
Block a user