summaryrefslogtreecommitdiff
path: root/src/libudev
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-06-23 08:31:16 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-06-25 09:00:19 +0200
commit6b000af4f206a87f424f05c163ea818b142e372e (patch)
tree941f6aee47abce048bd88a6218f8082b8b5c52fa /src/libudev
parentb18573e16fb0055029f6af9078c2e5f52626bc9b (diff)
downloadsystemd-6b000af4f206a87f424f05c163ea818b142e372e.tar.gz
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.
Diffstat (limited to 'src/libudev')
-rw-r--r--src/libudev/libudev-util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c
index 37660d0313..4a471fb90d 100644
--- a/src/libudev/libudev-util.c
+++ b/src/libudev/libudev-util.c
@@ -154,8 +154,8 @@ size_t util_replace_whitespace(const char *str, char *to, size_t len) {
return j;
}
-/* allow chars in whitelist, plain ascii, hex-escaping and valid utf8 */
-size_t util_replace_chars(char *str, const char *white) {
+/* allow chars in allow list, plain ascii, hex-escaping and valid utf8 */
+size_t util_replace_chars(char *str, const char *allow) {
size_t i = 0, replaced = 0;
assert(str);
@@ -163,7 +163,7 @@ size_t util_replace_chars(char *str, const char *white) {
while (str[i] != '\0') {
int len;
- if (whitelisted_char_for_devnode(str[i], white)) {
+ if (allow_listed_char_for_devnode(str[i], allow)) {
i++;
continue;
}
@@ -182,7 +182,7 @@ size_t util_replace_chars(char *str, const char *white) {
}
/* if space is allowed, replace whitespace with ordinary space */
- if (isspace(str[i]) && white && strchr(white, ' ')) {
+ if (isspace(str[i]) && allow && strchr(allow, ' ')) {
str[i] = ' ';
i++;
replaced++;