mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-30 14:55:26 +03:00
9fe3f9a938
Here I try to cleanup our various multifield iteration over the strings. Inspired by our nice list.h we now have a macro to iterate over the string and process the parts of it: It makes the code more readable and we don't change the string while we process it like the former strsep() does. Example: foreach_strpart(dev->symlink, " ", pos, len) { if (strncmp(&dev->symlink[pos], find_name, len) != 0) continue; ... } For the callout part selector %c{2} we separate now not only by space but also newline and return characters, cause some programs may give multiline values back. A possible RESULT match must contain wildcards for these characters. Also a bug in the recent udevinfo symlink query feature is fixed.
64 lines
1.5 KiB
Groff
64 lines
1.5 KiB
Groff
.TH UDEVINFO 8 "January 2004" "" "Linux Administrator's Manual"
|
|
.SH NAME
|
|
udevinfo \- retrieve information from udev
|
|
.SH SYNOPSIS
|
|
.B udevinfo
|
|
.RI "[\-q " query_type " \-p " sysfs_path "] [\-drVh]"
|
|
.SH "DESCRIPTION"
|
|
.B udevinfo
|
|
allows users to query the udev database for information on any of the devices
|
|
currently present in the system. It also provides a way to query any device
|
|
in the sysfs tree to help in creating
|
|
.B udev
|
|
rule files.
|
|
.SH "OPTIONS"
|
|
.TP
|
|
.B \-V
|
|
Print the version information.
|
|
.TP
|
|
.B \-r
|
|
Print the the
|
|
.B udev_root
|
|
directory. When used in conjunction with a query for the node name, the
|
|
.B udev_root
|
|
will be prepended.
|
|
.TP
|
|
.BI \-q " query_type"
|
|
Query the database for specified value of a created device node.
|
|
.RB Needs " \-p " or " \-n " specified.
|
|
.br
|
|
Valid types are:
|
|
.BR name ", " symlink ", " mode " ," owner " , " group " , " path " or " all.
|
|
.TP
|
|
.BI \-p " sysfs_path"
|
|
Specify the sysfs path of the device to query.
|
|
.TP
|
|
.BI \-n " name"
|
|
Specify the name of the node or the symlink for the device to query.
|
|
Partition names generated with the NAME{all_partitons} option can not be
|
|
queried, the main device must be used instead.
|
|
.TP
|
|
.B \-a
|
|
Print all
|
|
.BI SYSFS{ filename }
|
|
attributes along the device chain. Useful for for finding
|
|
unique attributes to compose a rule.
|
|
.RB Needs " \-p " specified.
|
|
.TP
|
|
.B \-d
|
|
Dump the whole database.
|
|
.TP
|
|
.B \-h
|
|
Print help text.
|
|
.SH "FILES"
|
|
.nf
|
|
/etc/udev/* udev config files
|
|
.fi
|
|
.LP
|
|
.SH "SEE ALSO"
|
|
.BR udev (8)
|
|
.SH AUTHORS
|
|
.B udevinfo
|
|
was developed primarily by Kay Sievers <kay.sievers@vrfy.org>, with help
|
|
from others.
|