tree-wide: avoid some loaded terms

https://tools.ietf.org/html/draft-knodel-terminology-02
https://lwn.net/Articles/823224/

This gets rid of most but not occasions of these loaded terms:

1. scsi_id and friends are something that is supposed to be removed from
   our tree (see #7594)

2. The test suite defines an API used by the ubuntu CI. We can remove
   this too later, but this needs to be done in sync with the ubuntu CI.

3. In some cases the terms are part of APIs we call or where we expose
   concepts the kernel names the way it names them. (In particular all
   remaining uses of the word "slave" in our codebase are like this,
   it's used by the POSIX PTY layer, by the network subsystem, the mount
   API and the block device subsystem). Getting rid of the term in these
   contexts would mean doing some major fixes of the kernel ABI first.

Regarding the replacements: when whitelist/blacklist is used as noun we
replace with with allow list/deny list, and when used as verb with
allow-list/deny-list.
This commit is contained in:
Lennart Poettering
2020-06-25 09:00:19 +02:00
committed by Zbigniew Jędrzejewski-Szmek
parent b18573e16f
commit 6b000af4f2
51 changed files with 365 additions and 354 deletions
+2 -2
View File
@@ -7,7 +7,7 @@
#include "device-nodes.h"
#include "utf8.h"
int whitelisted_char_for_devnode(char c, const char *white) {
int allow_listed_char_for_devnode(char c, const char *white) {
if ((c >= '0' && c <= '9') ||
(c >= 'A' && c <= 'Z') ||
@@ -38,7 +38,7 @@ int encode_devnode_name(const char *str, char *str_enc, size_t len) {
j += seqlen;
i += (seqlen-1);
} else if (str[i] == '\\' || !whitelisted_char_for_devnode(str[i], NULL)) {
} else if (str[i] == '\\' || !allow_listed_char_for_devnode(str[i], NULL)) {
if (len-j < 4)
return -EINVAL;
+1 -1
View File
@@ -8,7 +8,7 @@
#include "stdio-util.h"
int encode_devnode_name(const char *str, char *str_enc, size_t len);
int whitelisted_char_for_devnode(char c, const char *additional);
int allow_listed_char_for_devnode(char c, const char *additional);
#define DEV_NUM_PATH_MAX \
(STRLEN("/dev/block/") + DECIMAL_STR_MAX(dev_t) + 1 + DECIMAL_STR_MAX(dev_t))
+3 -3
View File
@@ -210,9 +210,9 @@ int efi_set_variable(
if (!p)
return -ENOMEM;
/* Newer efivarfs protects variables that are not in a whitelist with FS_IMMUTABLE_FL by default, to protect
* them for accidental removal and modification. We are not changing these variables accidentally however,
* hence let's unset the bit first. */
/* Newer efivarfs protects variables that are not in an allow list with FS_IMMUTABLE_FL by default,
* to protect them for accidental removal and modification. We are not changing these variables
* accidentally however, hence let's unset the bit first. */
r = chattr_path(p, 0, FS_IMMUTABLE_FL, &saved_flags);
if (r < 0 && r != -ENOENT)
+2 -2
View File
@@ -1576,7 +1576,7 @@ static int blockdev_is_encrypted(const char *sysfs_path, unsigned depth_left) {
d = opendir(p);
if (!d) {
if (errno == ENOENT) /* Doesn't have slaves */
if (errno == ENOENT) /* Doesn't have underlying devices */
return false;
return -errno;
@@ -1592,7 +1592,7 @@ static int blockdev_is_encrypted(const char *sysfs_path, unsigned depth_left) {
if (errno != 0)
return -errno;
break; /* No more slaves */
break; /* No more underlying devices */
}
q = path_join(p, de->d_name);