From Murai Takashi <tmurai01@xxxxxxxxx>:
Murai Takashi has uploaded this change for review. (
https://review.haiku-os.org/c/haiku/+/3145 )
Change subject: Bootloader: replace blacklist to blocklist
......................................................................
Bootloader: replace blacklist to blocklist
In various projects, both commercial and OSS, begin to use inclusive
terminology.
In Haiku, bootloader uses Blacklist, which is recommended replace to
Denylist or Blocklist. I think Blocklist is better replacement,
since it's a list used to block offending driver at boot.
This patch may break compatibility with previous blacklist.
Change-Id: Id9105ff5e9fcb866000355089b5ef97bf63ee854
---
R headers/private/kernel/boot/PathBlocklist.h
M src/add-ons/kernel/file_systems/packagefs/package/Package.cpp
M src/add-ons/kernel/file_systems/packagefs/volume/PackageSettings.cpp
M src/add-ons/kernel/file_systems/packagefs/volume/PackageSettings.h
M src/system/boot/loader/Jamfile
R src/system/boot/loader/PathBlocklist.cpp
M src/system/boot/loader/file_systems/packagefs/PackageSettingsItem.cpp
M src/system/boot/loader/file_systems/packagefs/PackageSettingsItem.h
M src/system/boot/loader/file_systems/packagefs/packagefs.cpp
M src/system/boot/loader/file_systems/packagefs/packagefs.h
M src/system/boot/loader/main.cpp
M src/system/boot/loader/menu.cpp
M src/system/boot/loader/menu.h
13 files changed, 146 insertions(+), 146 deletions(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/45/3145/1
diff --git a/headers/private/kernel/boot/PathBlacklist.h
b/headers/private/kernel/boot/PathBlocklist.h
similarity index 67%
rename from headers/private/kernel/boot/PathBlacklist.h
rename to headers/private/kernel/boot/PathBlocklist.h
index 851a785..426009b 100644
--- a/headers/private/kernel/boot/PathBlacklist.h
+++ b/headers/private/kernel/boot/PathBlocklist.h
@@ -2,8 +2,8 @@
* Copyright 2013, Ingo Weinhold, ingo_weinhold@xxxxxx.
* Distributed under the terms of the MIT License.
*/
-#ifndef KERNEL_BOOT_PATH_BLACKLIST_H
-#define KERNEL_BOOT_PATH_BLACKLIST_H
+#ifndef KERNEL_BOOT_PATH_BLOCKLIST_H
+#define KERNEL_BOOT_PATH_BLOCKLIST_H
#include <string.h>
@@ -11,10 +11,10 @@
#include <util/SinglyLinkedList.h>
-class BlacklistedPath : public SinglyLinkedListLinkImpl<BlacklistedPath> {
+class BlocklistedPath : public SinglyLinkedListLinkImpl<BlocklistedPath> {
public:
-
BlacklistedPath();
-
~BlacklistedPath();
+
BlocklistedPath();
+
~BlocklistedPath();
bool SetTo(const char* path);
@@ -39,13 +39,13 @@
};
-class PathBlacklist {
+class PathBlocklist {
public:
- typedef SinglyLinkedList<BlacklistedPath>::Iterator
Iterator;
+ typedef SinglyLinkedList<BlocklistedPath>::Iterator
Iterator;
public:
- PathBlacklist();
-
~PathBlacklist();
+ PathBlocklist();
+
~PathBlocklist();
bool Add(const char* path);
void Remove(const char*
path);
@@ -59,14 +59,14 @@
{
return fPaths.GetIterator(); }
private:
- BlacklistedPath* _FindPath(const char* path)
const;
+ BlocklistedPath* _FindPath(const char* path)
const;
private:
- typedef SinglyLinkedList<BlacklistedPath> PathList;
+ typedef SinglyLinkedList<BlocklistedPath> PathList;
private:
PathList fPaths;
};
-#endif // KERNEL_BOOT_PATH_BLACKLIST_H
+#endif // KERNEL_BOOT_PATH_BLOCKLIST_H
diff --git a/src/add-ons/kernel/file_systems/packagefs/package/Package.cpp
b/src/add-ons/kernel/file_systems/packagefs/package/Package.cpp
index bcb34e1..1044419 100644
--- a/src/add-ons/kernel/file_systems/packagefs/package/Package.cpp
+++ b/src/add-ons/kernel/file_systems/packagefs/package/Package.cpp
@@ -108,7 +108,7 @@
{
if (fErrorOccurred
|| (fLastSettingsEntry != NULL
- && fLastSettingsEntry->IsBlackListed())) {
+ && fLastSettingsEntry->IsBlockListed())) {
return B_OK;
}
@@ -128,7 +128,7 @@
if (settingsEntry != NULL) {
fLastSettingsEntry = settingsEntry;
fLastSettingsEntryEntry = entry;
- if (fLastSettingsEntry->IsBlackListed())
+ if (fLastSettingsEntry->IsBlockListed())
return B_OK;
}
}
@@ -191,7 +191,7 @@
{
if (fErrorOccurred
|| (fLastSettingsEntry != NULL
- && fLastSettingsEntry->IsBlackListed())) {
+ && fLastSettingsEntry->IsBlockListed())) {
return B_OK;
}
diff --git
a/src/add-ons/kernel/file_systems/packagefs/volume/PackageSettings.cpp
b/src/add-ons/kernel/file_systems/packagefs/volume/PackageSettings.cpp
index 8fcf2d1..004061d 100644
--- a/src/add-ons/kernel/file_systems/packagefs/volume/PackageSettings.cpp
+++ b/src/add-ons/kernel/file_systems/packagefs/volume/PackageSettings.cpp
@@ -16,7 +16,7 @@
#include "DebugSupport.h"
-static const char* const kEntryBlacklistParameterName = "EntryBlacklist";
+static const char* const kEntryBlocklistParameterName = "EntryBlocklist";
// #pragma mark - PackageSettingsItem
@@ -56,10 +56,10 @@
{
for (int i = 0; i < parameterCount; i++) {
const driver_parameter& subParameter = parameters[i];
- if (strcmp(subParameter.name, kEntryBlacklistParameterName) !=
0)
+ if (strcmp(subParameter.name, kEntryBlocklistParameterName) !=
0)
continue;
- status_t error = _AddBlackListedEntries(subParameter);
+ status_t error = _AddBlockListedEntries(subParameter);
// abort only in case of serious issues (memory shortage)
if (error == B_NO_MEMORY)
return error;
@@ -130,7 +130,7 @@
status_t
-PackageSettingsItem::_AddBlackListedEntries(const driver_parameter& parameter)
+PackageSettingsItem::_AddBlockListedEntries(const driver_parameter& parameter)
{
for (int i = 0; i < parameter.parameter_count; i++) {
Entry* entry;
@@ -139,7 +139,7 @@
if (error == B_NO_MEMORY)
return error;
- entry->SetBlackListed(true);
+ entry->SetBlockListed(true);
}
return B_OK;
diff --git a/src/add-ons/kernel/file_systems/packagefs/volume/PackageSettings.h
b/src/add-ons/kernel/file_systems/packagefs/volume/PackageSettings.h
index eea56e1..34fe2c7 100644
--- a/src/add-ons/kernel/file_systems/packagefs/volume/PackageSettings.h
+++ b/src/add-ons/kernel/file_systems/packagefs/volume/PackageSettings.h
@@ -23,7 +23,7 @@
:
fParent(parent),
fName(name),
- fIsBlackListed(false)
+ fIsBlockListed(false)
{
}
@@ -37,14 +37,14 @@
return fName;
}
- bool IsBlackListed() const
+ bool IsBlockListed() const
{
- return fIsBlackListed;
+ return fIsBlockListed;
}
- void SetBlackListed(bool blackListed)
+ void SetBlockListed(bool blockListed)
{
- fIsBlackListed = blackListed;
+ fIsBlockListed = blockListed;
}
Entry*& HashNext()
@@ -55,7 +55,7 @@
private:
Entry* fParent;
String fName;
- bool fIsBlackListed;
+ bool fIsBlockListed;
Entry* fHashNext;
};
@@ -150,7 +150,7 @@
typedef BOpenHashTable<EntryHashDefinition> EntryTable;
private:
- status_t _AddBlackListedEntries(
+ status_t _AddBlockListedEntries(
const
driver_parameter& parameter);
private:
diff --git a/src/system/boot/loader/Jamfile b/src/system/boot/loader/Jamfile
index c27db4e..ce5a86b 100644
--- a/src/system/boot/loader/Jamfile
+++ b/src/system/boot/loader/Jamfile
@@ -96,7 +96,7 @@
BootStaticLibrary [ MultiBootGristFiles boot_loader ] :
- PathBlacklist.cpp
+ PathBlocklist.cpp
elf.cpp
heap.cpp
kernel_args.cpp
diff --git a/src/system/boot/loader/PathBlacklist.cpp
b/src/system/boot/loader/PathBlocklist.cpp
similarity index 60%
rename from src/system/boot/loader/PathBlacklist.cpp
rename to src/system/boot/loader/PathBlocklist.cpp
index 82822cc..d530c8d 100644
--- a/src/system/boot/loader/PathBlacklist.cpp
+++ b/src/system/boot/loader/PathBlocklist.cpp
@@ -4,17 +4,17 @@
*/
-#include <boot/PathBlacklist.h>
+#include <boot/PathBlocklist.h>
#include <stdlib.h>
#include <algorithm>
-// #pragma mark - BlacklistedPath
+// #pragma mark - BlocklistedPath
-BlacklistedPath::BlacklistedPath()
+BlocklistedPath::BlocklistedPath()
:
fPath(NULL),
fLength(0),
@@ -23,14 +23,14 @@
}
-BlacklistedPath::~BlacklistedPath()
+BlocklistedPath::~BlocklistedPath()
{
free(fPath);
}
bool
-BlacklistedPath::SetTo(const char* path)
+BlocklistedPath::SetTo(const char* path)
{
size_t length = strlen(path);
if (length > 0 && path[length - 1] == '/')
@@ -49,7 +49,7 @@
bool
-BlacklistedPath::Append(const char* component)
+BlocklistedPath::Append(const char* component)
{
size_t componentLength = strlen(component);
if (componentLength > 0 && component[componentLength - 1] == '/')
@@ -70,7 +70,7 @@
bool
-BlacklistedPath::_Resize(size_t length, bool keepData)
+BlocklistedPath::_Resize(size_t length, bool keepData)
{
if (length == 0) {
free(fPath);
@@ -109,71 +109,71 @@
}
-// #pragma mark - PathBlacklist
+// #pragma mark - PathBlocklist
-PathBlacklist::PathBlacklist()
+PathBlocklist::PathBlocklist()
{
}
-PathBlacklist::~PathBlacklist()
+PathBlocklist::~PathBlocklist()
{
MakeEmpty();
}
bool
-PathBlacklist::Add(const char* path)
+PathBlocklist::Add(const char* path)
{
- BlacklistedPath* blacklistedPath = _FindPath(path);
- if (blacklistedPath != NULL)
+ BlocklistedPath* blocklistedPath = _FindPath(path);
+ if (blocklistedPath != NULL)
return true;
- blacklistedPath = new(std::nothrow) BlacklistedPath;
- if (blacklistedPath == NULL || !blacklistedPath->SetTo(path)) {
- delete blacklistedPath;
+ blocklistedPath = new(std::nothrow) BlocklistedPath;
+ if (blocklistedPath == NULL || !blocklistedPath->SetTo(path)) {
+ delete blocklistedPath;
return false;
}
- fPaths.Add(blacklistedPath);
+ fPaths.Add(blocklistedPath);
return true;
}
void
-PathBlacklist::Remove(const char* path)
+PathBlocklist::Remove(const char* path)
{
- BlacklistedPath* blacklistedPath = _FindPath(path);
- if (blacklistedPath != NULL) {
- fPaths.Remove(blacklistedPath);
- delete blacklistedPath;
+ BlocklistedPath* blocklistedPath = _FindPath(path);
+ if (blocklistedPath != NULL) {
+ fPaths.Remove(blocklistedPath);
+ delete blocklistedPath;
}
}
bool
-PathBlacklist::Contains(const char* path) const
+PathBlocklist::Contains(const char* path) const
{
return _FindPath(path) != NULL;
}
void
-PathBlacklist::MakeEmpty()
+PathBlocklist::MakeEmpty()
{
- while (BlacklistedPath* blacklistedPath = fPaths.RemoveHead())
- delete blacklistedPath;
+ while (BlocklistedPath* blocklistedPath = fPaths.RemoveHead())
+ delete blocklistedPath;
}
-BlacklistedPath*
-PathBlacklist::_FindPath(const char* path) const
+BlocklistedPath*
+PathBlocklist::_FindPath(const char* path) const
{
for (PathList::Iterator it = fPaths.GetIterator(); it.HasNext();) {
- BlacklistedPath* blacklistedPath = it.Next();
- if (*blacklistedPath == path)
- return blacklistedPath;
+ BlocklistedPath* blocklistedPath = it.Next();
+ if (*blocklistedPath == path)
+ return blocklistedPath;
}
return NULL;
diff --git
a/src/system/boot/loader/file_systems/packagefs/PackageSettingsItem.cpp
b/src/system/boot/loader/file_systems/packagefs/PackageSettingsItem.cpp
index c30b882..6a30fbe 100644
--- a/src/system/boot/loader/file_systems/packagefs/PackageSettingsItem.cpp
+++ b/src/system/boot/loader/file_systems/packagefs/PackageSettingsItem.cpp
@@ -88,10 +88,10 @@
for (int i = 0; i < parameter.parameter_count; i++) {
const driver_parameter& subParameter = parameter.parameters[i];
- if (strcmp(subParameter.name, "EntryBlacklist") != 0)
+ if (strcmp(subParameter.name, "EntryBlocklist") != 0)
continue;
- status_t error = _AddBlackListedEntries(subParameter);
+ status_t error = _AddBlockListedEntries(subParameter);
// abort only in case of serious issues (memory shortage)
if (error == B_NO_MEMORY)
return error;
@@ -164,7 +164,7 @@
status_t
-PackageSettingsItem::_AddBlackListedEntries(const driver_parameter& parameter)
+PackageSettingsItem::_AddBlockListedEntries(const driver_parameter& parameter)
{
for (int i = 0; i < parameter.parameter_count; i++) {
Entry* entry;
@@ -173,7 +173,7 @@
if (error == B_NO_MEMORY)
return error;
- entry->SetBlackListed(true);
+ entry->SetBlockListed(true);
}
return B_OK;
diff --git
a/src/system/boot/loader/file_systems/packagefs/PackageSettingsItem.h
b/src/system/boot/loader/file_systems/packagefs/PackageSettingsItem.h
index 3a0b6bb..85f5ff7 100644
--- a/src/system/boot/loader/file_systems/packagefs/PackageSettingsItem.h
+++ b/src/system/boot/loader/file_systems/packagefs/PackageSettingsItem.h
@@ -27,7 +27,7 @@
:
fParent(parent),
fName(NULL),
- fIsBlackListed(false),
+ fIsBlockListed(false),
fHashNext(NULL)
{
}
@@ -58,14 +58,14 @@
return fName;
}
- bool IsBlackListed() const
+ bool IsBlockListed() const
{
- return fIsBlackListed;
+ return fIsBlockListed;
}
- void SetBlackListed(bool blackListed)
+ void SetBlockListed(bool blockListed)
{
- fIsBlackListed = blackListed;
+ fIsBlockListed = blockListed;
}
Entry*& HashNext()
@@ -76,7 +76,7 @@
private:
Entry* fParent;
char* fName;
- bool fIsBlackListed;
+ bool fIsBlockListed;
Entry* fHashNext;
};
@@ -176,7 +176,7 @@
typedef BOpenHashTable<EntryHashDefinition> EntryTable;
private:
- status_t _AddBlackListedEntries(
+ status_t _AddBlockListedEntries(
const
driver_parameter& parameter);
private:
diff --git a/src/system/boot/loader/file_systems/packagefs/packagefs.cpp
b/src/system/boot/loader/file_systems/packagefs/packagefs.cpp
index a7f37c6..c462429 100644
--- a/src/system/boot/loader/file_systems/packagefs/packagefs.cpp
+++ b/src/system/boot/loader/file_systems/packagefs/packagefs.cpp
@@ -24,7 +24,7 @@
#include <Referenceable.h>
-#include <boot/PathBlacklist.h>
+#include <boot/PathBlocklist.h>
#include <boot/platform.h>
#include "PackageSettingsItem.h"
@@ -390,7 +390,7 @@
{
if (fErrorOccurred
|| (fLastSettingsEntry != NULL
- && fLastSettingsEntry->IsBlackListed())) {
+ && fLastSettingsEntry->IsBlockListed())) {
return B_OK;
}
@@ -411,7 +411,7 @@
if (settingsEntry != NULL) {
fLastSettingsEntry = settingsEntry;
fLastSettingsEntryEntry = entry;
- if (fLastSettingsEntry->IsBlackListed())
+ if (fLastSettingsEntry->IsBlockListed())
return B_OK;
}
}
@@ -885,14 +885,14 @@
void
-packagefs_apply_path_blacklist(::Directory* systemDirectory,
- const PathBlacklist& pathBlacklist)
+packagefs_apply_path_blocklist(::Directory* systemDirectory,
+ const PathBlocklist& pathBlocklist)
{
PackageFS::Directory* directory
= static_cast<PackageFS::Directory*>(systemDirectory);
- for (PathBlacklist::Iterator it = pathBlacklist.GetIterator();
- BlacklistedPath* path = it.Next();) {
+ for (PathBlocklist::Iterator it = pathBlocklist.GetIterator();
+ BlocklistedPath* path = it.Next();) {
directory->RemoveEntry(path->Path());
}
}
diff --git a/src/system/boot/loader/file_systems/packagefs/packagefs.h
b/src/system/boot/loader/file_systems/packagefs/packagefs.h
index be51060..12819ae 100644
--- a/src/system/boot/loader/file_systems/packagefs/packagefs.h
+++ b/src/system/boot/loader/file_systems/packagefs/packagefs.h
@@ -11,7 +11,7 @@
#include <SupportDefs.h>
-class PathBlacklist;
+class PathBlocklist;
class Directory;
class Node;
@@ -19,8 +19,8 @@
status_t packagefs_mount_file(int fd, Directory* systemDirectory,
Directory*& _mountedDirectory);
-void packagefs_apply_path_blacklist(Directory* systemDirectory,
- const PathBlacklist& pathBlacklist);
+void packagefs_apply_path_blocklist(Directory* systemDirectory,
+ const PathBlocklist& pathBlocklist);
#endif // BOOT_LOADER_FILE_SYSTEMS_PACKAGEFS_H
diff --git a/src/system/boot/loader/main.cpp b/src/system/boot/loader/main.cpp
index cf470e8..85c5466 100644
--- a/src/system/boot/loader/main.cpp
+++ b/src/system/boot/loader/main.cpp
@@ -12,7 +12,7 @@
#include <boot/vfs.h>
#include <boot/platform.h>
#include <boot/heap.h>
-#include <boot/PathBlacklist.h>
+#include <boot/PathBlocklist.h>
#include <boot/stdio.h>
#include <boot/net/NetStack.h>
@@ -62,7 +62,7 @@
bool mountedAllVolumes = false;
BootVolume bootVolume;
- PathBlacklist pathBlacklist;
+ PathBlocklist pathBlocklist;
if (get_boot_file_system(args, bootVolume) != B_OK
|| (platform_boot_options() & BOOT_OPTION_MENU) != 0) {
@@ -79,7 +79,7 @@
mountedAllVolumes = true;
- if (user_menu(bootVolume, pathBlacklist) < B_OK) {
+ if (user_menu(bootVolume, pathBlocklist) < B_OK) {
// user requested to quit the loader
goto out;
}
@@ -103,7 +103,7 @@
mountedAllVolumes = true;
}
- if (user_menu(bootVolume, pathBlacklist) != B_OK
+ if (user_menu(bootVolume, pathBlocklist) != B_OK
|| !bootVolume.IsValid()) {
// user requested to quit the loader
goto out;
@@ -115,8 +115,8 @@
// know our boot volume, too
if (status == B_OK) {
if (bootVolume.IsPackaged()) {
-
packagefs_apply_path_blacklist(bootVolume.SystemDirectory(),
- pathBlacklist);
+
packagefs_apply_path_blocklist(bootVolume.SystemDirectory(),
+ pathBlocklist);
}
register_boot_file_system(bootVolume);
diff --git a/src/system/boot/loader/menu.cpp b/src/system/boot/loader/menu.cpp
index 3ae809b..d632548 100644
--- a/src/system/boot/loader/menu.cpp
+++ b/src/system/boot/loader/menu.cpp
@@ -17,7 +17,7 @@
#include <AutoDeleter.h>
#include <boot/menu.h>
-#include <boot/PathBlacklist.h>
+#include <boot/PathBlocklist.h>
#include <boot/stage2.h>
#include <boot/vfs.h>
#include <boot/platform.h>
@@ -46,9 +46,9 @@
// only set while in user_menu()
static Menu* sMainMenu = NULL;
-static Menu* sBlacklistRootMenu = NULL;
+static Menu* sBlocklistRootMenu = NULL;
static BootVolume* sBootVolume = NULL;
-static PathBlacklist* sPathBlacklist;
+static PathBlocklist* sPathBlocklist;
MenuItem::MenuItem(const char *label, Menu *subMenu)
@@ -518,12 +518,12 @@
}
-// #pragma mark - blacklist menu
+// #pragma mark - blocklist menu
-class BlacklistMenuItem : public MenuItem {
+class BlocklistMenuItem : public MenuItem {
public:
- BlacklistMenuItem(char* label, Node* node, Menu* subMenu)
+ BlocklistMenuItem(char* label, Node* node, Menu* subMenu)
:
MenuItem(label, subMenu),
fNode(node),
@@ -533,7 +533,7 @@
SetType(MENU_ITEM_MARKABLE);
}
- ~BlacklistMenuItem()
+ ~BlocklistMenuItem()
{
fNode->Release();
@@ -546,12 +546,12 @@
return fNode->Type() == S_IFDIR;
}
- bool GetPath(BlacklistedPath& _path) const
+ bool GetPath(BlocklistedPath& _path) const
{
Menu* menu = Supermenu();
- if (menu != NULL && menu != sBlacklistRootMenu
+ if (menu != NULL && menu != sBlocklistRootMenu
&& menu->Superitem() != NULL) {
- return
static_cast<BlacklistMenuItem*>(menu->Superitem())
+ return
static_cast<BlocklistMenuItem*>(menu->Superitem())
->GetPath(_path)
&& _path.Append(Label());
}
@@ -559,11 +559,11 @@
return _path.SetTo(Label());
}
- void UpdateBlacklisted()
+ void UpdateBlocklisted()
{
- BlacklistedPath path;
+ BlocklistedPath path;
if (GetPath(path))
- _SetMarked(sPathBlacklist->Contains(path.Path()),
false);
+ _SetMarked(sPathBlocklist->Contains(path.Path()),
false);
}
virtual void SetMarked(bool marked)
@@ -573,10 +573,10 @@
static bool Less(const MenuItem* a, const MenuItem* b)
{
- const BlacklistMenuItem* item1
- = static_cast<const BlacklistMenuItem*>(a);
- const BlacklistMenuItem* item2
- = static_cast<const BlacklistMenuItem*>(b);
+ const BlocklistMenuItem* item1
+ = static_cast<const BlocklistMenuItem*>(a);
+ const BlocklistMenuItem* item2
+ = static_cast<const BlocklistMenuItem*>(b);
// directories come first
if (item1->IsDirectoryItem() != item2->IsDirectoryItem())
@@ -587,7 +587,7 @@
}
private:
- void _SetMarked(bool marked, bool updateBlacklist)
+ void _SetMarked(bool marked, bool updateBlocklist)
{
if (marked == IsMarked())
return;
@@ -596,13 +596,13 @@
if (IsDirectoryItem())
SetSubmenu(marked ? NULL : fSubMenu);
- if (updateBlacklist) {
- BlacklistedPath path;
+ if (updateBlocklist) {
+ BlocklistedPath path;
if (GetPath(path)) {
if (marked)
- sPathBlacklist->Add(path.Path());
+ sPathBlocklist->Add(path.Path());
else
- sPathBlacklist->Remove(path.Path());
+ sPathBlocklist->Remove(path.Path());
}
}
@@ -615,16 +615,16 @@
};
-class BlacklistMenu : public Menu {
+class BlocklistMenu : public Menu {
public:
- BlacklistMenu()
+ BlocklistMenu()
:
Menu(STANDARD_MENU, kDefaultMenuTitle),
fDirectory(NULL)
{
}
- ~BlacklistMenu()
+ ~BlocklistMenu()
{
SetDirectory(NULL);
}
@@ -638,19 +638,19 @@
if (fDirectory->Open(&cookie, O_RDONLY) == B_OK) {
Node* node;
while (fDirectory->GetNextNode(cookie, &node)
== B_OK) {
- BlacklistMenuItem* item =
_CreateItem(node);
+ BlocklistMenuItem* item =
_CreateItem(node);
node->Release();
if (item == NULL)
break;
AddItem(item);
- item->UpdateBlacklisted();
+ item->UpdateBlocklisted();
}
fDirectory->Close(cookie);
}
- SortItems(&BlacklistMenuItem::Less);
+ SortItems(&BlocklistMenuItem::Less);
}
if (CountItems() > 0)
@@ -676,7 +676,7 @@
}
private:
- static BlacklistMenuItem* _CreateItem(Node* node)
+ static BlocklistMenuItem* _CreateItem(Node* node)
{
// Get the node name and duplicate it, so we can use it as a
label.
char name[B_FILE_NAME_LENGTH];
@@ -689,17 +689,17 @@
strlcat(name, "/", sizeof(name));
// If this is a directory, create the submenu.
- BlacklistMenu* subMenu = NULL;
+ BlocklistMenu* subMenu = NULL;
if (isDirectory) {
- subMenu = new(std::nothrow) BlacklistMenu;
+ subMenu = new(std::nothrow) BlocklistMenu;
if (subMenu != NULL)
subMenu->SetDirectory(static_cast<Directory*>(node));
}
- ObjectDeleter<BlacklistMenu> subMenuDeleter(subMenu);
+ ObjectDeleter<BlocklistMenu> subMenuDeleter(subMenu);
// create the menu item
- BlacklistMenuItem* item = new(std::nothrow)
BlacklistMenuItem(name,
+ BlocklistMenuItem* item = new(std::nothrow)
BlocklistMenuItem(name,
node, subMenu);
if (item == NULL)
return NULL;
@@ -723,22 +723,22 @@
};
-const char* const BlacklistMenu::kDefaultMenuTitle
- = "Mark the entries to blacklist";
+const char* const BlocklistMenu::kDefaultMenuTitle
+ = "Mark the entries to blocklist";
-class BlacklistRootMenu : public BlacklistMenu {
+class BlocklistRootMenu : public BlocklistMenu {
public:
- BlacklistRootMenu()
+ BlocklistRootMenu()
:
- BlacklistMenu()
+ BlocklistMenu()
{
}
virtual void Entered()
{
// Get the system directory, but only if this is a packaged
Haiku.
- // Otherwise blacklisting isn't supported.
+ // Otherwise blocklisting isn't supported.
if (sBootVolume != NULL && sBootVolume->IsValid()
&& sBootVolume->IsPackaged()) {
SetDirectory(sBootVolume->SystemDirectory());
@@ -746,11 +746,11 @@
} else {
SetDirectory(NULL);
SetTitle(sBootVolume != NULL && sBootVolume->IsValid()
- ? "The selected boot volume doesn't support
blacklisting!"
+ ? "The selected boot volume doesn't support
blocklisting!"
: "No boot volume selected!");
}
- BlacklistMenu::Entered();
+ BlocklistMenu::Entered();
// rename last item
if (MenuItem* item = ItemAt(CountItems() - 1))
@@ -759,7 +759,7 @@
virtual void Exited()
{
- BlacklistMenu::Exited();
+ BlocklistMenu::Exited();
SetDirectory(NULL);
}
};
@@ -952,7 +952,7 @@
if (sBootVolume->IsValid() && sBootVolume->RootDirectory() ==
item->Data())
return true;
- sPathBlacklist->MakeEmpty();
+ sPathBlocklist->MakeEmpty();
status_t status = sBootVolume->SetTo((Directory*)item->Data());
update_continue_booting_menu_item(status);
@@ -978,7 +978,7 @@
volumeItem->Select(true);
volumeItem->UpdateStateName(item->VolumeState());
- sPathBlacklist->MakeEmpty();
+ sPathBlocklist->MakeEmpty();
status_t status = sBootVolume->SetTo((Directory*)item->Data(),
item->VolumeInfo(), item->VolumeState());
@@ -1336,9 +1336,9 @@
platform_add_menus(safeMenu);
safeMenu->AddSeparatorItem();
- sBlacklistRootMenu = new(std::nothrow) BlacklistRootMenu;
- safeMenu->AddItem(item = new(std::nothrow) MenuItem("Blacklist entries",
- sBlacklistRootMenu));
+ sBlocklistRootMenu = new(std::nothrow) BlocklistRootMenu;
+ safeMenu->AddItem(item = new(std::nothrow) MenuItem("Blocklist entries",
+ sBlocklistRootMenu));
item->SetHelpText("Allows to select system files that shall be ignored.
"
"Useful e.g. to disable drivers temporarily.");
@@ -1542,15 +1542,15 @@
static void
-apply_safe_mode_path_blacklist()
+apply_safe_mode_path_blocklist()
{
- if (sPathBlacklist->IsEmpty())
+ if (sPathBlocklist->IsEmpty())
return;
- bool success = sSafeModeOptionsBuffer.Append("EntryBlacklist {\n");
+ bool success = sSafeModeOptionsBuffer.Append("EntryBlocklist {\n");
- for (PathBlacklist::Iterator it = sPathBlacklist->GetIterator();
- BlacklistedPath* path = it.Next();) {
+ for (PathBlocklist::Iterator it = sPathBlocklist->GetIterator();
+ BlocklistedPath* path = it.Next();) {
success &= sSafeModeOptionsBuffer.Append(path->Path());
success &= sSafeModeOptionsBuffer.Append("\n", 1);
}
@@ -1559,7 +1559,7 @@
if (!success) {
dprintf("apply_safe_mode_options(): failed to append path "
- "blacklist to buffer\n");
+ "blblocklist to buffer\n");
}
}
@@ -1573,14 +1573,14 @@
status_t
-user_menu(BootVolume& _bootVolume, PathBlacklist& _pathBlacklist)
+user_menu(BootVolume& _bootVolume, PathBlocklist& _pathBlocklist)
{
Menu* menu = new(std::nothrow) Menu(MAIN_MENU);
sMainMenu = menu;
sBootVolume = &_bootVolume;
- sPathBlacklist = &_pathBlacklist;
+ sPathBlocklist = &_pathBlocklist;
Menu* safeModeMenu = NULL;
Menu* debugMenu = NULL;
@@ -1621,7 +1621,7 @@
apply_safe_mode_options(safeModeMenu);
apply_safe_mode_options(debugMenu);
- apply_safe_mode_path_blacklist();
+ apply_safe_mode_path_blocklist();
add_safe_mode_settings(sSafeModeOptionsBuffer.String());
delete menu;
@@ -1629,8 +1629,8 @@
TRACE(("user_menu: leave\n"));
sMainMenu = NULL;
- sBlacklistRootMenu = NULL;
+ sBlocklistRootMenu = NULL;
sBootVolume = NULL;
- sPathBlacklist = NULL;
+ sPathBlocklist = NULL;
return B_OK;
}
diff --git a/src/system/boot/loader/menu.h b/src/system/boot/loader/menu.h
index bf2be20..faabaa7 100644
--- a/src/system/boot/loader/menu.h
+++ b/src/system/boot/loader/menu.h
@@ -9,11 +9,11 @@
#include <boot/vfs.h>
-class PathBlacklist;
+class PathBlocklist;
extern status_t user_menu(BootVolume& _bootVolume,
- PathBlacklist& _pathBlacklist);
+ PathBlocklist& _pathBlocklist);
#endif /* MENU_H */
--
To view, visit https://review.haiku-os.org/c/haiku/+/3145
To unsubscribe, or for help writing mail filters, visit
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Id9105ff5e9fcb866000355089b5ef97bf63ee854
Gerrit-Change-Number: 3145
Gerrit-PatchSet: 1
Gerrit-Owner: Murai Takashi <tmurai01@xxxxxxxxx>
Gerrit-MessageType: newchange