Merge pull request #27206 from yuwata/udev-rename

udev: rename arguments and options, update comments
This commit is contained in:
Daan De Meyer
2023-04-11 09:12:21 +02:00
committed by GitHub
8 changed files with 18 additions and 16 deletions
+2 -2
View File
@@ -8,12 +8,12 @@
#include "string-util.h"
#include "utf8.h"
int allow_listed_char_for_devnode(char c, const char *white) {
int allow_listed_char_for_devnode(char c, const char *additional) {
return
ascii_isdigit(c) ||
ascii_isalpha(c) ||
strchr("#+-.:=@_", c) ||
(white && strchr(white, c));
(additional && strchr(additional, c));
}
int encode_devnode_name(const char *str, char *str_enc, size_t len) {
+6 -4
View File
@@ -32,8 +32,10 @@ static const struct option options[] = {
{ "device", required_argument, NULL, 'd' },
{ "config", required_argument, NULL, 'f' },
{ "page", required_argument, NULL, 'p' },
{ "blacklisted", no_argument, NULL, 'b' },
{ "whitelisted", no_argument, NULL, 'g' },
{ "denylisted", no_argument, NULL, 'b' },
{ "allowlisted", no_argument, NULL, 'g' },
{ "blacklisted", no_argument, NULL, 'b' }, /* backward compat */
{ "whitelisted", no_argument, NULL, 'g' }, /* backward compat */
{ "replace-whitespace", no_argument, NULL, 'u' },
{ "sg-version", required_argument, NULL, 's' },
{ "verbose", no_argument, NULL, 'v' },
@@ -222,8 +224,8 @@ static void help(void) {
" -f --config= Location of config file\n"
" -p --page=0x80|0x83|pre-spc3-83 SCSI page (0x80, 0x83, pre-spc3-83)\n"
" -s --sg-version=3|4 Use SGv3 or SGv4\n"
" -b --blacklisted Treat device as blacklisted\n"
" -g --whitelisted Treat device as whitelisted\n"
" -b --denylisted Treat device as denylisted\n"
" -g --allowlisted Treat device as allowlisted\n"
" -u --replace-whitespace Replace all whitespace by underscores\n"
" -v --verbose Verbose logging\n"
" -x --export Print values as environment keys\n",
+1 -1
View File
@@ -161,7 +161,7 @@ static int scsi_dump_sense(struct scsi_id_device *dev_scsi,
* Figure out and print the sense key, asc and ascq.
*
* If you want to suppress these for a particular drive model, add
* a black list entry in the scsi_id config file.
* a deny list entry in the scsi_id config file.
*
* XXX We probably need to: lookup the sense/asc/ascq in a retry
* table, and if found return 1 (after dumping the sense, asc, and