summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2020-07-06 03:39:12 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-07-10 01:36:07 +0200
commitabb6c01519a0318d7165dc9dc5b7d185353f93d6 (patch)
tree3b6fa1fc13fba77efc13ee3283c3e6c145bd4252 /vcl
parent493ae7a6bb0c3ad50615db0090e7ae8d391bc327 (diff)
replace usage of whitelist with allowlist
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 [API CHANGE] officecfg::Office::Common::Misc::OpenCLWhiteList -> OpenCLAllowList Change-Id: I65636b19b13e4af1e4851f70e78053f3443d6bb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98181 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/driverblocklist.hxx6
-rw-r--r--vcl/opengl/README.opengl2
-rw-r--r--vcl/opengl/opengl_denylist_windows.xml4
-rw-r--r--vcl/qa/cppunit/blocklistparsertest.cxx18
-rw-r--r--vcl/qa/cppunit/test_blocklist_evaluate.xml4
-rw-r--r--vcl/qa/cppunit/test_blocklist_parse.xml4
-rw-r--r--vcl/skia/skia_denylist_vulkan.xml4
-rw-r--r--vcl/source/helper/driverblocklist.cxx22
8 files changed, 32 insertions, 32 deletions
diff --git a/vcl/inc/driverblocklist.hxx b/vcl/inc/driverblocklist.hxx
index a3564bd1ab79..d8f8a40dfdbd 100644
--- a/vcl/inc/driverblocklist.hxx
+++ b/vcl/inc/driverblocklist.hxx
@@ -77,7 +77,7 @@ enum VersionComparisonOp
struct DriverInfo
{
DriverInfo(OperatingSystem os, const OUString& vendor, VersionComparisonOp op,
- uint64_t driverVersion, bool bWhiteListed = false,
+ uint64_t driverVersion, bool bAllowListed = false,
const char* suggestedVersion = nullptr);
DriverInfo();
@@ -86,7 +86,7 @@ struct DriverInfo
OUString maAdapterVendor;
std::vector<OUString> maDevices;
- bool mbWhitelisted;
+ bool mbAllowlisted;
VersionComparisonOp meComparisonOp;
@@ -113,7 +113,7 @@ private:
enum class BlockType
{
- WHITELIST,
+ ALLOWLIST,
DENYLIST,
UNKNOWN
};
diff --git a/vcl/opengl/README.opengl b/vcl/opengl/README.opengl
index ad5f31c9e5a8..d1b6cf2d1bd1 100644
--- a/vcl/opengl/README.opengl
+++ b/vcl/opengl/README.opengl
@@ -7,7 +7,7 @@ Environment variables used:
SAL_USE_VCLPLUGIN - use the specified VCL plugin (GTK2 in this case - currently
needed on Linux because the default GTK3 doesn't support OpenGL yet)
-SAL_FORCEGL - enable OpenGL even if the card is whitelisted.
+SAL_FORCEGL - enable OpenGL even if the card would be excluded.
Other variables:
diff --git a/vcl/opengl/opengl_denylist_windows.xml b/vcl/opengl/opengl_denylist_windows.xml
index 7419be7c5d8b..e2025c94a624 100644
--- a/vcl/opengl/opengl_denylist_windows.xml
+++ b/vcl/opengl/opengl_denylist_windows.xml
@@ -18,8 +18,8 @@
-->
<root>
- <whitelist>
- </whitelist>
+ <allowlist>
+ </allowlist>
<denylist>
<entry os="all" vendor="intel" compare="less" version="10.18.14.4264">
<device id="all"/>
diff --git a/vcl/qa/cppunit/blocklistparsertest.cxx b/vcl/qa/cppunit/blocklistparsertest.cxx
index 1a22d61e3577..b79de071d319 100644
--- a/vcl/qa/cppunit/blocklistparsertest.cxx
+++ b/vcl/qa/cppunit/blocklistparsertest.cxx
@@ -46,46 +46,46 @@ void BlocklistParserTest::testParse()
size_t i = 0;
- for (bool bIsWhitelisted : {true, false})
+ for (bool bIsAllowlisted : {true, false})
{
DriverInfo& aDriveInfo = aDriveInfos[i++];
- CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted);
+ CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted);
CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorAll), aDriveInfo.maAdapterVendor); // "all"
CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_LESS_THAN, aDriveInfo.meComparisonOp);
CPPUNIT_ASSERT_EQUAL(V(10,20,30,40), aDriveInfo.mnDriverVersion);
aDriveInfo = aDriveInfos[i++];
- CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted);
+ CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted);
CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorNVIDIA), aDriveInfo.maAdapterVendor);
CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_EQUAL, aDriveInfo.meComparisonOp);
aDriveInfo = aDriveInfos[i++];
- CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted);
+ CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted);
CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorMicrosoft), aDriveInfo.maAdapterVendor);
CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_NOT_EQUAL, aDriveInfo.meComparisonOp);
aDriveInfo = aDriveInfos[i++];
- CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted);
+ CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted);
CPPUNIT_ASSERT_EQUAL(OUString("0xcafe"), aDriveInfo.maAdapterVendor);
CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_NOT_EQUAL, aDriveInfo.meComparisonOp);
aDriveInfo = aDriveInfos[i++];
- CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted);
+ CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted);
CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorAll), aDriveInfo.maAdapterVendor);
CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_BETWEEN_EXCLUSIVE, aDriveInfo.meComparisonOp);
aDriveInfo = aDriveInfos[i++];
- CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted);
+ CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted);
CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorAll), aDriveInfo.maAdapterVendor);
CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_BETWEEN_INCLUSIVE, aDriveInfo.meComparisonOp);
aDriveInfo = aDriveInfos[i++];
- CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted);
+ CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted);
CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorAll), aDriveInfo.maAdapterVendor);
CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_BETWEEN_INCLUSIVE_START, aDriveInfo.meComparisonOp);
aDriveInfo = aDriveInfos[i++];
- CPPUNIT_ASSERT_EQUAL(bIsWhitelisted, aDriveInfo.mbWhitelisted);
+ CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted);
CPPUNIT_ASSERT_EQUAL(GetVendorId(VendorAll), aDriveInfo.maAdapterVendor);
CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_COMPARISON_IGNORED, aDriveInfo.meComparisonOp);
}
diff --git a/vcl/qa/cppunit/test_blocklist_evaluate.xml b/vcl/qa/cppunit/test_blocklist_evaluate.xml
index 7c0527f849ec..9184a9c9bd30 100644
--- a/vcl/qa/cppunit/test_blocklist_evaluate.xml
+++ b/vcl/qa/cppunit/test_blocklist_evaluate.xml
@@ -18,8 +18,8 @@
-->
<root>
- <whitelist>
- </whitelist>
+ <allowlist>
+ </allowlist>
<denylist>
<entry os="all" vendor="amd" compare="less" version="10.20.30.40">
diff --git a/vcl/qa/cppunit/test_blocklist_parse.xml b/vcl/qa/cppunit/test_blocklist_parse.xml
index 212e61bd8443..9a0f6acc574f 100644
--- a/vcl/qa/cppunit/test_blocklist_parse.xml
+++ b/vcl/qa/cppunit/test_blocklist_parse.xml
@@ -8,7 +8,7 @@
-->
<root>
- <whitelist>
+ <allowlist>
<entry os="all" vendor="all" compare="less" version="10.20.30.40">
<device id="all"/>
</entry>
@@ -33,7 +33,7 @@
<entry os="all">
<device id="all"/>
</entry>
- </whitelist>
+ </allowlist>
<denylist>
<entry os="all" vendor="all" compare="less" version="10.20.30.40">
<device id="all"/>
diff --git a/vcl/skia/skia_denylist_vulkan.xml b/vcl/skia/skia_denylist_vulkan.xml
index 4c62ca4b04a9..43143548cd5a 100644
--- a/vcl/skia/skia_denylist_vulkan.xml
+++ b/vcl/skia/skia_denylist_vulkan.xml
@@ -18,8 +18,8 @@
-->
<root>
- <whitelist>
- </whitelist>
+ <allowlist>
+ </allowlist>
<denylist>
<entry os="all" vendor="intel" compare="less_equal" version="0.16.2">
<device id="all"/>
diff --git a/vcl/source/helper/driverblocklist.cxx b/vcl/source/helper/driverblocklist.cxx
index 09ce2f9b7165..49bc819b54d6 100644
--- a/vcl/source/helper/driverblocklist.cxx
+++ b/vcl/source/helper/driverblocklist.cxx
@@ -372,13 +372,13 @@ void Parser::handleDevices(DriverInfo& rDriver, xmlreader::XmlReader& rReader)
void Parser::handleEntry(DriverInfo& rDriver, xmlreader::XmlReader& rReader)
{
- if (meBlockType == BlockType::WHITELIST)
+ if (meBlockType == BlockType::ALLOWLIST)
{
- rDriver.mbWhitelisted = true;
+ rDriver.mbAllowlisted = true;
}
else if (meBlockType == BlockType::DENYLIST)
{
- rDriver.mbWhitelisted = false;
+ rDriver.mbAllowlisted = false;
}
else if (meBlockType == BlockType::UNKNOWN)
{
@@ -484,9 +484,9 @@ void Parser::handleContent(xmlreader::XmlReader& rReader)
if (res == xmlreader::XmlReader::Result::Begin)
{
- if (name == "whitelist")
+ if (name == "allowlist")
{
- meBlockType = BlockType::WHITELIST;
+ meBlockType = BlockType::ALLOWLIST;
handleList(rReader);
}
else if (name == "denylist")
@@ -504,7 +504,7 @@ void Parser::handleContent(xmlreader::XmlReader& rReader)
}
else if (res == xmlreader::XmlReader::Result::End)
{
- if (name == "whitelist" || name == "denylist")
+ if (name == "allowlist" || name == "denylist")
{
meBlockType = BlockType::UNKNOWN;
}
@@ -562,7 +562,7 @@ const uint64_t allDriverVersions = ~(uint64_t(0));
DriverInfo::DriverInfo()
: meOperatingSystem(DRIVER_OS_UNKNOWN)
, maAdapterVendor(GetVendorId(VendorAll))
- , mbWhitelisted(false)
+ , mbAllowlisted(false)
, meComparisonOp(DRIVER_COMPARISON_IGNORED)
, mnDriverVersion(0)
, mnDriverVersionMax(0)
@@ -570,11 +570,11 @@ DriverInfo::DriverInfo()
}
DriverInfo::DriverInfo(OperatingSystem os, const OUString& vendor, VersionComparisonOp op,
- uint64_t driverVersion, bool bWhitelisted,
+ uint64_t driverVersion, bool bAllowlisted,
const char* suggestedVersion /* = nullptr */)
: meOperatingSystem(os)
, maAdapterVendor(vendor)
- , mbWhitelisted(bWhitelisted)
+ , mbAllowlisted(bAllowlisted)
, meComparisonOp(op)
, mnDriverVersion(driverVersion)
, mnDriverVersionMax(0)
@@ -658,9 +658,9 @@ bool FindBlocklistedDeviceInList(std::vector<DriverInfo>& aDeviceInfos,
if (match || aDeviceInfos[i].mnDriverVersion == allDriverVersions)
{
// white listed drivers
- if (aDeviceInfos[i].mbWhitelisted)
+ if (aDeviceInfos[i].mbAllowlisted)
{
- SAL_INFO("vcl.driver", "whitelisted driver");
+ SAL_INFO("vcl.driver", "allowlisted driver");
return false;
}