Bug#1130448: udev.7: Some remarks and a patch with editorial changes for this man page
Bjarni Ingi Gislason
bjarniig at simnet.is
Thu Mar 12 03:19:49 GMT 2026
Package: udev
Version: 260~rc2-1
Severity: minor
Tags: patch, upstream
Dear Maintainer,
>From "/usr/share/doc/debian/bug-reporting.txt.gz":
Don't file bugs upstream
If you file a bug in Debian, don't send a copy to the upstream software
maintainers yourself, as it is possible that the bug exists only in
Debian. If necessary, the maintainer of the package will forward the
bug upstream.
-.-
I do not send reports upstream if I have to get an account there.
The Debian maintainers have one already.
If I get a negative (or no) response from upstream, I send henceforth
bugs to Debian.
-.-
* What led up to the situation?
Checking for defects with a new version
test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z < "man page"
[Use
grep -n -e ' $' -e '\\~$' -e ' \\f.$' -e ' \\"' <file>
to find (most) trailing spaces.]
["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).
[The fate of "test-nroff" was decided in groff bug #55941.]
* What was the outcome of this action?
Output from "test-nroff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ":
troff:<stdin>:737: warning [page 1, line 541]: cannot break line in l adjust mode; overset by 6n
* What outcome did you expect instead?
No output (no warnings).
-.-
General remarks and further material, if a diff-file exist, are in the
attachments.
-- System Information:
Debian Release: forky/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.18.15+deb14-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages udev depends on:
ii libc6 2.42-13
ii libkmod2 34.2-2+b1
ii libsystemd-shared 260~rc2-1
ii libudev1 260~rc2-1
ii systemd [systemd-sysusers] 260~rc2-1
udev recommends no packages.
udev suggests no packages.
Versions of packages udev is related to:
ii systemd 260~rc2-1
-- no debconf information
-------------- next part --------------
Input file is udev.7
Output from "mandoc -T lint udev.7": (shortened list)
66 STYLE: input text line longer than 80 bytes:
1 WARNING: missing date, using "": TH
3 WARNING: skipping paragraph macro: PP after SH
3 WARNING: skipping paragraph macro: PP after SS
-.-.
Output from
test-nroff -mandoc -t -Kutf8 -ww -z udev.7: (shortened list)
1 cannot break line in l adjust mode; overset by 6n
-.-.
Input file is udev.7
Change '-' (\-) to '\(en' (en-dash) for a (numeric) range.
GNU gnulib has recently (2023-06-18) updated its
"build_aux/update-copyright" to recognize "\(en" in man pages.
udev.7:300:"[0\-9]"
udev.7:333:"0\-9A\-Za\-z#+\-\&.:=@_/", valid UTF\-8 character sequences, and
-.-.
Wrong distance (not two spaces) between sentences in the input file.
Separate the sentences and subordinate clauses; each begins on a new
line. See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").
The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.
Remember coding: Only one command ("sentence") on each (logical) line.
E-mail: Easier to quote exactly the relevant lines.
Generally: Easier to edit the sentence.
Patches: Less unaffected text.
Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.
The amount of space between sentences in the output can then be
controlled with the ".ss" request.
Mark a final abbreviation point as such by suffixing it with "\&".
Some sentences (etc.) do not begin on a new line.
Split (sometimes) lines after a punctuation mark; before a conjunction.
Lines with only one (or two) space(s) between sentences could be split,
so latter sentences begin on a new line.
Use
#!/usr/bin/sh
sed -e '/^\./n' \
-e 's/\([[:alpha:]]\)\. */\1.\n/g' $1
to split lines after a sentence period.
Check result with the difference between the formatted outputs.
See also the attachment "general.bugs"
[List of affected lines removed.]
-.-.
Split lines longer than 80 characters (fill completely
an A4 sized page line on a terminal)
into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.
Add "\:" to split the string for the output, "\<newline>" in the source.
[List of affected lines removed.]
Longest line is number 339 with 459 characters
Multiple symlinks may be specified by separating the names by the space character\&. In case multiple devices claim the same name, the link always points to the device with the highest link_priority\&. If the current device goes away, the links are re\-evaluated and the device with the next highest link_priority becomes the owner of the link\&. If no link_priority is specified, the order of the devices (and which one of them owns the link) is undefined\&.
-.-.
Remove unnecessary double font change (e.g., \fR\fI) in a row or (better)
use a two-fonts macro.
167:\fIATTR{\fR\fI\fIfilename\fR\fR\fI}\fR
174:\fIATTRS{\fR\fI\fIfilename\fR\fR\fI}\fR
183:\fISYSCTL{\fR\fI\fIkernel parameter\fR\fR\fI}\fR
190:\fIENV{\fR\fI\fIkey\fR\fR\fI}\fR
195:\fICONST{\fR\fI\fIkey\fR\fR\fI}\fR
245:\fITEST{\fR\fI\fIoctal mode mask\fR\fR\fI}\fR
349:\fISECLABEL{\fR\fI\fImodule\fR\fR\fI}\fR
356:\fIATTR{\fR\fI\fIkey\fR\fR\fI}\fR
361:\fISYSCTL{\fR\fI\fIkernel parameter\fR\fR\fI}\fR
368:\fIENV{\fR\fI\fIkey\fR\fR\fI}\fR
382:\fIRUN{\fR\fI\fItype\fR\fR\fI}\fR
447:\fIIMPORT{\fR\fI\fItype\fR\fR\fI}\fR
510:\fBlink_priority=\fR\fB\fIvalue\fR\fR
515:\fBstring_escape=\fR\fB\fInone|replace\fR\fR
521:\fIENV{\fR\fI\fIkey\fR\fR\fI}\fR
526:\fIENV{\fR\fI\fIkey\fR\fR\fI}\fR\&. Defaults to unset\&.
555:\fBlog_level=\fR\fB\fIlevel\fR\fR
650:\fB$attr{\fR\fB\fIfile\fR\fR\fB}\fR, \fB%s{\fR\fB\fIfile\fR\fR\fB}\fR
662:\fB$env{\fR\fB\fIkey\fR\fR\fB}\fR, \fB%E{\fR\fB\fIkey\fR\fR\fB}\fR
-.-.
Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".
udev.7:64:Compare for equality\&. (The specified key has the specified value\&.)
udev.7:69:Compare for inequality\&. (The specified key does not have the specified value, or the specified key is not present at all\&.)
udev.7:339:Multiple symlinks may be specified by separating the names by the space character\&. In case multiple devices claim the same name, the link always points to the device with the highest link_priority\&. If the current device goes away, the links are re\-evaluated and the device with the next highest link_priority becomes the owner of the link\&. If no link_priority is specified, the order of the devices (and which one of them owns the link) is undefined\&.
udev.7:488:is used as a filter of key names to import (with the same shell glob pattern matching used for comparisons)\&.
udev.7:548:Set the flag (sticky bit) on the udev database entry of the event device\&. Device properties are then kept in the database even when
udev.7:550:is called\&. This option can be useful in certain cases (e\&.g\&. Device Mapper devices) for persisting device state on the transition from initrd\&.
-.-.
No need for '\&' to be in front of a period (.),
if there is a character in front of it.
Remove with "sed -e 's/\(.\)\\&\./\1./g'".
28:directory, or renames network interfaces\&. The kernel usually just assigns unpredictable device names based on the order of discovery\&. Meaningful symlinks or network device names provide a way to reliably identify devices based on their properties or current configuration\&.
31:\fBsystemd-udevd.service\fR(8), receives device uevents directly from the kernel whenever a device is added or removed from the system, or it changes its state\&. When udev receives a device event, it matches its configured set of rules against various device attributes to identify the device\&. Rules that match may provide additional device information to be stored in the udev database or to be used to create meaningful symlink names\&.
33:All device information udev processes is stored in the udev database and sent out to possible event subscribers\&. Access to all stored data and the event sources is provided by the library libudev\&.
37:/usr/lib/udev/rules\&.d
39:/usr/local/lib/udev/rules\&.d, the volatile runtime directory
40:/run/udev/rules\&.d
42:/etc/udev/rules\&.d\&. All rules files are collectively sorted and processed in lexicographic order, regardless of the directories in which they live\&. However, files with identical filenames replace each other\&. Files in
47:/usr/\&. This can be used to override a system\-supplied rules file with a local file if needed; a symlink in
51:/dev/null, disables the rules file entirely\&. Rule files must have the extension
52:\&.rules; other extensions are ignored\&.
54:Every line in the rules file contains at least one key\-value pair\&. Except for empty lines or lines beginning with
55:"#", which are ignored\&. There are two kinds of keys: match and assignment\&. If all match keys match against their values, the rule gets applied and the assignment keys get the specified values assigned\&.
57:A matching rule may rename a network interface, add symlinks pointing to the device node, or run a specified program as part of the event handling\&.
59:A rule consists of a comma\-separated list of one or more key\-operator\-value expressions\&. Each expression has a distinct effect, depending on the key and operator used\&.
64:Compare for equality\&. (The specified key has the specified value\&.)
69:Compare for inequality\&. (The specified key does not have the specified value, or the specified key is not present at all\&.)
74:Assign a value to a key\&. Keys that represent a list are reset and only this single value is assigned\&.
79:Add the value to a key that holds a list of entries\&.
84:Remove the value from a key that holds a list of entries\&.
86:Added in version 217\&.
91:Assign a value to a key finally; disallow any later changes\&.
93:Added in version 247\&.
97:Values are written as double quoted strings, such as ("string")\&. To include a quotation mark (") in the value, precede it by a backslash (\e")\&. Any other occurrences of a backslash followed by a character are not unescaped\&. That is, "\et\en" is treated as four characters: backslash, lowercase t, backslash, lowercase n\&.
100:\m[blue]\fBEscape sequences in C\fR\m[]\&\s-2\u[1]\d\s+2\&. For example, e"string\en" is parsed as 7 characters: 6 lowercase letters and a newline\&. This can be useful for writing special characters when a kernel driver requires them\&.
102:The string can be prefixed with a lowercase i (i"string") to mark that the string or pattern will match case\-insensitively\&. For example, i"foo" will match
106:and so on\&. The prefix can be used only for match ("==") or unmatch ("!=") rules, e\&.g\&.
107:\fIATTR{foo}==i"abcd"\fR\&.
111:is not allowed in either string variant\&.
114:The following key names can be used to match against device properties\&. Some of the keys also match against properties of the parent devices in sysfs, not only the device that has generated the event\&. If multiple keys that match a parent device are specified in a single rule, all these keys must match at one and the same parent device\&.
118:Match the name of the event action\&.
123:Match the devpath of the event device\&.
128:Match the name of the event device\&.
133:Search the devpath upwards for a matching device name\&.
138:Match the name of a network interface\&. It can be used once the NAME key has been set in one of the preceding rules\&.
143:Match the name of a symlink targeting the node\&. It can be used once a SYMLINK key has been set in one of the preceding rules\&. There may be multiple symlinks; only one needs to match\&. If the operator is
144:"!=", the token returns true only if there is no symlink matched\&.
149:Match the subsystem of the event device\&.
154:Search the devpath upwards for a matching device subsystem name\&.
159:Match the driver name of the event device\&. Only set this key for devices which are bound to a driver at the time the event is generated\&.
164:Search the devpath upwards for a matching device driver name\&.
169:Match sysfs attribute value of the event device\&.
171:Trailing whitespace in the attribute values is ignored unless the specified match value itself contains trailing whitespace\&.
176:Search the devpath upwards for a device with matching sysfs attribute values\&. If multiple
178:matches are specified, all of them must match on the same device\&.
180:Trailing whitespace in the attribute values is ignored unless the specified match value itself contains trailing whitespace\&.
185:Match a kernel parameter value\&.
187:Added in version 240\&.
192:Match against a device property value\&.
197:Match against a system\-wide constant\&. Supported keys are:
201:System\*(Aqs architecture\&. See
205:for possible values\&.
207:Added in version 244\&.
212:System\*(Aqs virtualization environment\&. See
214:for possible values\&.
216:Added in version 244\&.
221:System\*(Aqs confidential virtualization technology\&. See
223:for possible values\&.
225:Added in version 254\&.
228:Unknown keys will never match\&.
230:Added in version 244\&.
235:Match against one of device tags\&. It can be used once a TAG key has been set in one of the preceding rules\&. There may be multiple tags; only one needs to match\&. If the operator is
236:"!=", the token returns true only if there is no tag matched\&.
241:Search the devpath upwards for a device with matching tag\&. If the operator is
242:"!=", the token returns true only if there is no tag matched\&.
247:Test the existence of a file\&. An octal mode mask can be specified if needed\&.
252:Execute a program to determine whether there is a match; the key is true if the program returns successfully\&. The device properties are made available to the executed program in the environment\&. The program\*(Aqs standard output is available in the
254:key\&.
256:This can only be used for very short\-running foreground tasks\&. For details, see
257:\fIRUN\fR\&.
266:"=="\&.
273:call\&. This key can be used in the same or in any later rule after a
275:call\&.
278:Most of the fields support shell glob pattern matching and alternate patterns\&. The following special characters are supported:
282:Matches zero or more characters\&.
287:Matches any single character\&.
292:Matches any single character specified within the brackets\&. For example, the pattern string
297:"ttyR"\&. Ranges are also supported via the
299:character\&. For example, to match on the range of all digits, the pattern
301:could be used\&. If the first character following the
304:"!", any characters not enclosed are matched\&.
309:Separates alternative patterns\&. For example, the pattern string
314:"x*"\&.
316:Added in version 217\&.
323:The name to use for a network interface\&. See
325:for a higher\-level mechanism for setting the interface name\&. The name of a device node cannot be changed by udev, only additional symlinks can be created\&.
330:The name of a symlink targeting the node\&. Every matching rule adds this value to the list of symlinks to be created\&.
332:The set of characters to name a symlink is limited\&. Allowed characters are
333:"0\-9A\-Za\-z#+\-\&.:=@_/", valid UTF\-8 character sequences, and
335:hex encoding\&. All other characters are replaced by a
337:character\&.
339:Multiple symlinks may be specified by separating the names by the space character\&. In case multiple devices claim the same name, the link always points to the device with the highest link_priority\&. If the current device goes away, the links are re\-evaluated and the device with the next highest link_priority becomes the owner of the link\&. If no link_priority is specified, the order of the devices (and which one of them owns the link) is undefined\&.
341:Symlink names must never conflict with the kernel\*(Aqs default device node names, as that would result in unpredictable behavior\&.
346:The permissions for the device node\&. Every specified value overrides the compiled\-in default value\&.
351:Applies the specified Linux Security Module label to the device node\&.
353:Added in version 209\&.
358:The value that should be written to a sysfs attribute of the event device\&.
363:The value that should be written to kernel parameter\&.
365:Added in version 220\&.
370:Set a device property value\&. Property names with a leading
371:"\&."
374:match key)\&.
379:Attach a tag to a device\&. This is used to filter events for users of libudev\*(Aqs monitor functionality, or to enumerate a group of tagged devices\&. The implementation can only work efficiently if only a few tags are attached to a device\&. It is only meant to be used in contexts with specific device filter requirements, and not as a general\-purpose flag\&. Excessive use might result in inefficient event handling\&.
384:Specify a program to be executed after processing of all the rules for the event\&. With
388:":=", it replaces any previous contents of the list\&. Please note that both
396:affects both types\&.
403:Execute an external program specified as the assigned value\&. If no absolute path is given, the program is expected to live in
404:/usr/lib/udev; otherwise, the absolute path must be specified\&.
408:is specified\&.
414:\fIprogram\fR, but use one of the built\-in programs rather than an external one\&.
416:Added in version 199\&.
419:The program name and following arguments are separated by spaces\&. Single quotes can be used to specify arguments with spaces\&.
421:This can only be used for very short\-running foreground tasks\&. Running an event process for a long period of time may block all further events for this or a dependent device\&.
424:systemd\-udevd\&.service\&.
426:Starting daemons or other long\-running processes is not allowed; the forked processes, detached or not, will be unconditionally killed after the event handling has finished\&. In order to activate long\-running processes from udev rules, provide a service unit and pull it in from a udev device using the
428:device property\&. See
430:for details\&.
437:may jump\&.
444:with a matching name\&.
454:Execute an external program specified as the assigned value and, if it returns successfully, import its output, which must be in environment key format\&. Path specification, command/argument separation, and quoting work like in
455:\fIRUN\fR\&.
457:Added in version 199\&.
463:"program", but use one of the built\-in programs rather than an external one\&.
465:Added in version 199\&.
470:Import a text file specified as the assigned value, the content of which must be in environment key format\&.
475:Import a single property specified as the assigned value from the current device database\&. This works only if the database is already populated by an earlier event\&.
480:Import a single property from the kernel command line\&. For simple flags the value of the property is set to
481:"1"\&.
486:Import the stored keys from the parent device by reading the database entry of the parent device\&. The value assigned to
488:is used as a filter of key names to import (with the same shell glob pattern matching used for comparisons)\&.
491:This can only be used for very short\-running foreground tasks\&. For details see
492:\fBRUN\fR\&.
501:"=="\&. The key is true if the import is successful, unless
503:is used as the operator which causes the key to be true if the import failed\&.
512:Specify the priority of the created symlinks\&. Devices with higher priorities overwrite existing symlinks of other devices\&. The default is 0\&.
522:are replaced\&. When
523:"none", no replacement is performed\&. When unset, the replacement is performed for
526:\fIENV{\fR\fI\fIkey\fR\fR\fI}\fR\&. Defaults to unset\&.
531:Apply the permissions specified in this rule to the static device node with the specified name\&. Also, for every tag specified in this rule, create a symlink in the directory
533:pointing at the static device node with the specified name\&. Static device node creation is performed by systemd\-tmpfiles before systemd\-udevd is started\&. The static nodes might not have a corresponding kernel device; they are used to trigger automatic kernel module loading when they are accessed\&.
538:Watch the device node with inotify; when the node is closed after being opened for writing, a change uevent is synthesized\&.
543:Disable the watching of a device node with inotify\&.
548:Set the flag (sticky bit) on the udev database entry of the event device\&. Device properties are then kept in the database even when
550:is called\&. This option can be useful in certain cases (e\&.g\&. Device Mapper devices) for persisting device state on the transition from initrd\&.
552:Added in version 241\&.
561:"reset"\&. When a log level name is specified, the maximum log level is changed to that level\&. When
563:is set, then the previously specified log level is revoked\&. Defaults to the log level of the main process of
564:\fBsystemd\-udevd\fR\&.
566:This may be useful when debugging events for certain devices\&. Note that the log level is applied when the line including this rule is processed\&. So, for debugging, it is recommended that this is specified at earlier place, e\&.g\&., the first line of
567:00\-debug\&.rules\&.
575:# /etc/udev/rules\&.d/00\-debug\-net\&.rules
582:Added in version 248\&.
587:Dump the status of the event currently processing\&. It may be useful for debugging udev rules by inserting this option\&.
589:Added in version 258\&.
595:\fBdump\fR, but dump the status of the event in JSON format\&.
597:Added in version 259\&.
611:fields support simple string substitutions\&. The
613:substitutions are performed after all rules have been processed, right before the program is executed, allowing for the use of device properties set by earlier matching rules\&. For all other fields, substitutions are performed while the individual rule is being processed\&. The available substitutions are:
617:The kernel name for this device\&.
622:The kernel number for this device\&. For example,
624:has kernel number 3\&.
629:The devpath of the device\&.
638:\fBATTRS\fR\&.
647:\fBATTRS\fR\&.
652:The value of a sysfs attribute found at the device where all keys of the rule have matched\&. If the matching device does not have such an attribute, and a previous
657:test selected a parent device, then the attribute from that parent device is used\&.
659:If the attribute is a symlink, the last element of the symlink target is returned as the value\&.
664:A device property value\&.
669:The kernel major number for the device\&.
674:The kernel minor number for the device\&.
680:\fIPROGRAM\fR\&. A single part of the string, separated by a space character, may be selected by specifying the part number as an attribute:
681:"%c{N}"\&. If the number is followed by the
684:"%c{N+}"\&.
689:The node name of the parent device\&.
694:The current name of the device\&. If not changed by a rule, it is the name of the kernel device\&.
699:A space\-separated list of the current symlinks\&. The value is only set during a remove event or if an earlier rule assigned a value\&.
704:The udev_root value\&.
709:The sysfs mount point\&.
714:The name of the device node\&.
721:character itself\&.
728:character itself\&.
-.-.
Only one space character is after a possible end of sentence
(after a punctuation, that can end a sentence).
[List of affected lines removed.]
-.-.
Remove quotes when there is a printable
but no space character between them
and the quotes are not for emphasis (markup),
for example as an argument to a macro.
udev.7:2:.TH "UDEV" "7" "" "systemd 260~rc2" "udev"
udev.7:22:.SH "NAME"
udev.7:24:.SH "DESCRIPTION"
udev.7:60:.SS "Operators"
udev.7:95:.SS "Values"
udev.7:112:.SS "Keys"
udev.7:733:.SH "NOTES"
-.-.
Remove excessive "\&" when it has no functional purpose.
100:\m[blue]\fBEscape sequences in C\fR\m[]\&\s-2\u[1]\d\s+2\&. For example, e"string\en" is parsed as 7 characters: 6 lowercase letters and a newline\&. This can be useful for writing special characters when a kernel driver requires them\&.
-.-.
Put a (long) web address on a new output line to reduce the posibility of
splitting the address between two output lines.
Or inhibit hyphenation with "\%" in front of the name.
737:\%https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences
-.-.
Output from "test-nroff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ":
troff:<stdin>:737: warning [page 1, line 541]: cannot break line in l adjust mode; overset by 6n
-.-
Generally:
Split (sometimes) lines after a punctuation mark; before a conjunction.
-.-
Tables:
Use the preprocessor 'tbl' to make tables.
Put data, that are wider than the header in the (centered) last column,
in a "T{...\nT}" block(, when the table gets wider than the output line).
Table headers, that are wider than any data in the corresponding column,
do not need to be centered, so left adjustment (l, L) is sufficient.
-------------- next part --------------
--- udev.7 2026-03-12 02:32:13.427976893 +0000
+++ udev.7.new 2026-03-12 03:16:32.757440000 +0000
@@ -1,5 +1,5 @@
'\" t
-.TH "UDEV" "7" "" "systemd 260~rc2" "udev"
+.TH UDEV 7 "" "systemd 260~rc2" udev
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -19,10 +19,9 @@
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
-.SH "NAME"
+.SH NAME
udev \- Dynamic device management
-.SH "DESCRIPTION"
-.PP
+.SH DESCRIPTION
udev supplies the system software with device events, manages permissions of device nodes and may create additional symlinks in the
/dev/
directory, or renames network interfaces\&. The kernel usually just assigns unpredictable device names based on the order of discovery\&. Meaningful symlinks or network device names provide a way to reliably identify devices based on their properties or current configuration\&.
@@ -32,7 +31,6 @@ The udev daemon,
.PP
All device information udev processes is stored in the udev database and sent out to possible event subscribers\&. Access to all stored data and the event sources is provided by the library libudev\&.
.SH "RULES FILES"
-.PP
The udev rules are read from the files located in the system rules directories
/usr/lib/udev/rules\&.d
and
@@ -57,8 +55,7 @@ Every line in the rules file contains at
A matching rule may rename a network interface, add symlinks pointing to the device node, or run a specified program as part of the event handling\&.
.PP
A rule consists of a comma\-separated list of one or more key\-operator\-value expressions\&. Each expression has a distinct effect, depending on the key and operator used\&.
-.SS "Operators"
-.PP
+.SS Operators
"=="
.RS 4
Compare for equality\&. (The specified key has the specified value\&.)
@@ -92,12 +89,11 @@ Assign a value to a key finally; disallo
.sp
Added in version 247\&.
.RE
-.SS "Values"
-.PP
+.SS Values
Values are written as double quoted strings, such as ("string")\&. To include a quotation mark (") in the value, precede it by a backslash (\e")\&. Any other occurrences of a backslash followed by a character are not unescaped\&. That is, "\et\en" is treated as four characters: backslash, lowercase t, backslash, lowercase n\&.
.PP
The string can be prefixed with a lowercase e (e"string\en") to mark the string as C\-style escaped, see
-\m[blue]\fBEscape sequences in C\fR\m[]\&\s-2\u[1]\d\s+2\&. For example, e"string\en" is parsed as 7 characters: 6 lowercase letters and a newline\&. This can be useful for writing special characters when a kernel driver requires them\&.
+\m[blue]\fBEscape sequences in C\fR\m[]\s-2\u[1]\d\s+2. For example, e"string\en" is parsed as 7 characters: 6 lowercase letters and a newline. This can be useful for writing special characters when a kernel driver requires them.
.PP
The string can be prefixed with a lowercase i (i"string") to mark that the string or pattern will match case\-insensitively\&. For example, i"foo" will match
"foo",
@@ -109,8 +105,7 @@ and so on\&. The prefix can be used only
Please note that
\fBNUL\fR
is not allowed in either string variant\&.
-.SS "Keys"
-.PP
+.SS Keys
The following key names can be used to match against device properties\&. Some of the keys also match against properties of the parent devices in sysfs, not only the device that has generated the event\&. If multiple keys that match a parent device are specified in a single rule, all these keys must match at one and the same parent device\&.
.PP
\fIACTION\fR
@@ -297,7 +292,7 @@ or
"ttyR"\&. Ranges are also supported via the
"\-"
character\&. For example, to match on the range of all digits, the pattern
-"[0\-9]"
+"[0\(en9]"
could be used\&. If the first character following the
"["
is a
@@ -330,7 +325,7 @@ for a higher\-level mechanism for settin
The name of a symlink targeting the node\&. Every matching rule adds this value to the list of symlinks to be created\&.
.sp
The set of characters to name a symlink is limited\&. Allowed characters are
-"0\-9A\-Za\-z#+\-\&.:=@_/", valid UTF\-8 character sequences, and
+"0\(en9A\(enZa\(enz#+\(en\&.:=@_/", valid UTF\-8 character sequences, and
"\ex00"
hex encoding\&. All other characters are replaced by a
"_"
@@ -367,8 +362,8 @@ Added in version 220\&.
.PP
\fIENV{\fR\fI\fIkey\fR\fR\fI}\fR
.RS 4
-Set a device property value\&. Property names with a leading
-"\&."
+Set a device property value. Property names with a leading
+"."
are neither stored in the database nor exported to events or external tools (run by, for example, the
\fIPROGRAM\fR
match key)\&.
@@ -728,11 +723,18 @@ The
character itself\&.
.RE
.SH "SEE ALSO"
-.PP
\fBsystemd-udevd.service\fR(8), \fBudevadm\fR(8), \fBsystemd.link\fR(5)
-.SH "NOTES"
+.SH NOTES
.IP " 1." 4
Escape sequences in C
.RS 4
-\%https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences
+.ie \n(.g \{\
+\%https://en.wikipedia.org/wiki/\:Escape_sequences_in_C#Table_of_escape_sequences
+.\}
+.el \{\
+.nf
+https://en.wikipedia.org/wiki/
+Escape_sequences_in_C#Table_of_escape_sequences
+.fi
+.\}
.RE
-------------- next part --------------
Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)
[gn]roff -mandoc -t -ww -b -z -K utf8 <man page>
To find trailing space use
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>
The same goes for man pages that are used as an input.
-.-
For a style guide use
mandoc -T lint
-.-
For general input conventions consult the man page "nroff(7)" (item
"Input conventions") or the Texinfo manual about the same item.
-.-
Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.
It should also check its input files for too long (> 80) lines.
This is just a simple quality control measure.
The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.
-.-
Common defects:
Not removing trailing spaces (in in- and output).
The reason for these trailing spaces should be found and eliminated.
"git" has a "tool" to point out whitespace,
see for example "git-apply(1)" and git-config(1)")
-.-
Not beginning each input sentence on a new line.
Line length and patch size should thus be reduced when that has been fixed.
The script "reportbug" uses 'quoted-printable' encoding when a line is
longer than 1024 characters in an 'ascii' file.
See man-pages(7), item "semantic newline".
-.-
The difference between the formatted output of the original
and patched file can be seen with:
nroff -mandoc <file1> > <out1>
nroff -mandoc <file2> > <out2>
diff -d -u <out1> <out2>
and for groff, using
\"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - \"
instead of 'nroff -mandoc'
Add the option '-t', if the file contains a table.
Read the output from 'diff -d -u ...' with 'less -R' or similar.
-.-.
If 'man' (man-db) is used to check the manual for warnings,
the following must be set:
The option "-warnings=w"
The environmental variable:
export MAN_KEEP_STDERR=yes (or any non-empty value)
or
(produce only warnings):
export MANROFFOPT="-ww -b -z"
export MAN_KEEP_STDERR=yes (or any non-empty value)
-.-
More information about the Pkg-systemd-maintainers
mailing list