Commit Graph

35 Commits

Author SHA1 Message Date
Vivien Kraus
89a68e7c7e Clarify the /etc/udev/hwdb.d file override with respect to UDEV_HWDB_PATH
Overriding a file in /etc/udev/hwdb.d also hides the files with that
name in UDEV_HWDB_PATH.
2023-10-01 19:51:23 +02:00
Vivien Kraus
672cbb5742 Remove references to /run/udev/hwdb.d
This directory never seemed to exist. The wording is very similar to
that of the Rules Files section, so it is possible that the same text
was copied and pasted by mistake. The HWDB never looked for files in
/run.

Having a non-volatile index of volatile files would probably not be
useful.
2023-10-01 19:50:37 +02:00
Boian Bonev
218489052f
Improve wording and restore lines lost in merges
Generate udev.7 from udev.xml
2023-09-30 22:29:22 +00:00
Boian Bonev
060dc0ffaf
Merge branch 'master' into master 2023-10-01 00:26:08 +03:00
Boian Bonev
701d83f686
Merge branch 'master' into udevadm-hwdb-update-output 2023-10-01 00:16:38 +03:00
Boian Bonev
5f98fb38c1
Merge branch 'master' into hwdb-bin-file-environment 2023-10-01 00:04:32 +03:00
Vivien Kraus
65e17b2f2f Dynamically get the udevadm hwdb files with a path variable
Introduce UDEV_HWDB_PATH, containing a colon-separated path with hwdb
files in it. The whole path is searched, in addition to the system
locations, when searching for hwdb files.

Due to how conf_files_list_strv is implemented, as a thin wrapper
around the internal function, it is easy to also implement a variant
accepting a search path in the same way. Since the internal function
expects an allocated array of allocated strings, the path scanning is
done in 2 steps, to first get the array length, and then duplicate the
items. It is not possible to use strtok(_r) here because it would work
for only 1 pass.

* src/shared/conf-files.c (conf_files_list_follow_path): New function.
(conf_files_list_strv_path): Use it here.
* src/shared/conf-files.h: Export the signature for the _path variant.
* src/udev/udevadm-hwdb.c (list_conf_file_path): New function
replacing conf_file_dirs.
(help): Document the search path for hwdb files.
(adm_hwdb): Use list_conf_file_path and conf_files_list_strv_path.
* man/udevadm.xml: Mention UDEV_HWDB_PATH.
* man/udev.xml: Same.
* man/udevadm.8: Regenerate.
* man/udev.7: Same.
2023-09-30 19:40:17 +02:00
Vivien Kraus
1eca0ef6c4 Add a generic --output argument to udevadm hwdb
Instead of always writing /etc/udev/hwdb.bin or UDEV_LIBEXEC_DIR
/hwdb.bin, let the user specify a full file name.

* src/udev/udevadm-hwdb.c (adm_hwdb): New option "output". Construct
hwdb_bin when processing options, and prepend root after processing
options.
* man/udev.xml: Mention --output.
* man/udevadm.xml: Document --output.
* man/udev.7: Regenerate.
* man/udevadm.8: Same.
2023-09-30 19:38:30 +02:00
Vivien Kraus
c7da117e5c Let libudev find hwdb.bin under UDEV_HWDB_BIN
* src/libudev/libudev-hwdb.c (get_hwdb_bin_paths): New function,
replacing hwdb_bin_paths.
(struct udev_hwdb): New bin_paths field.
(udev_hwdb_new): Initialize it with get_hwdb_bin_paths.
(udev_hwdb_validate): Use the bin_paths field to find hwdb.bin.
(udev_hwdb_unref): Free the bin_paths field.
* src/libudev/libudev.h: Warn about UDEV_HWDB_BIN.
* man/udev.xml: Mention run-time UDEV_HWDB_BIN.
* man/udev.7: Re-generate.
2023-09-30 19:36:55 +02:00
Boian Bonev
e5e4013cb7
Move the changes from udev.7 to udev.xml
Commit 0cf14fb changed only the generated udev.7 without touching the
source file udev.xml
2023-09-30 16:52:12 +00:00
Boian Bonev
c23157fed2
Fix spelling 2022-04-06 03:39:43 +03:00
Anthony G. Basile
451bbdaa39 man/udev.xml: remove repeated section, gentoo bug #619434
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2017-09-04 20:49:25 -04:00
Robby Workman
26b8f53163 Remove obsolete udev_root references
This was removed in 6ada823a9a
2015-11-15 15:11:13 -06:00
Kay Sievers
b8adef56d8 udev: add SYSCTL{} support
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18 20:33:17 -04:00
Anthony G. Basile
9d06e65608 man/udev.xml: restore hwdb documentation 2014-12-20 11:45:25 -05:00
Lennart Poettering
2694f4de06 man: add emacs header to get correct indention in nxml-mode for the manpage XML files that use 2ch indenting
In the long run we really should figure out if we want to stick with 8ch
or 2ch indenting, and not continue with half-and-half. For now, just
make emacs aware of the files that use 2ch indenting.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-11-27 08:29:53 -05:00
Anthony G. Basile
014ba30c45 man/udev.xml: update man page
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-10-30 21:55:57 -04:00
David Herrmann
ffdc02f45b udev: allow removing tags via TAG-="foobar"
This extends the udev parser to support OP_REMOVE (-=) and adds support
for TAG-= to remove previously set tags. We don't fail if the tag didn't
exist.

This is pretty handy if we ship default rules for seat-assignments and
users want to exclude specific devices from that. They can easily add
rules that drop any automatically added "seat" tags again.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-09-13 08:46:04 -04:00
Andrei Borzenkov
534b690568 Document "...|..." udev match syntax
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-27 21:41:14 -04:00
Kay Sievers
471a5f3411 udev: unify event timeout handling
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-30 09:31:38 -04:00
Kay Sievers
87539be437 udev: support custom Linux Security Module labels for device nodes
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-01-09 18:47:32 -05:00
Anthony G. Basile
9930444543 man/udev.xml: add doc about hwdb database
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-30 08:37:19 -04:00
Zbigniew Jędrzejewski-Szmek
ff93c898bc man: always supply quotes around literals
When manpages are displayed on a terminal, <literal>s are indistinguishable
from surrounding text. Add quotes everywhere, remove duplicate quotes,
and tweak a few lists for consistent formatting.

https://bugzilla.redhat.com/show_bug.cgi?id=874631

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-26 14:02:06 -04:00
Anthony G. Basile
5ec82b08d4 man/udev.xml: minor cleanup
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-26 13:57:29 -04:00
Anthony G. Basile
cdd665a921 man: updates from upstream
Added upstream systemd-udevd.service(8) as udevd(8)

Authors include

	Tom Gundersen
	Zbigniew Jędrzejewski-Szmek
	Thomas Hindoe Paaboel Andersen
	Kay Sievers
	Lennart Poettering

See http://cgit.freedesktop.org/systemd/systemd/log/man/udev.xml
and http://cgit.freedesktop.org/systemd/systemd/log/man/systemd-udevd.service.xml
and http://cgit.freedesktop.org/systemd/systemd/log/man/udevadm.xml

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 15:22:47 -04:00
Richard Yao
8a72e9e927 Remove user-visible systemd references from man pages
Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-22 22:53:21 -05:00
Thomas Hindoe Paaboel Andersen
bb31a4ac19 man: typo fixes
https://bugs.freedesktop.org/show_bug.cgi?id=55890

Fixed typos, serial comma, and removed "either" as there were more
than two options. Also did an extra rename of "system-shutdown"
to "systemd-shutdown" that was forgotten in commit
8bd3b8620c
2012-10-26 00:16:47 +02:00
Kay Sievers
b1239c3fb3 udev: man - clarify escaping and replacing for SYMLINK+= 2012-07-02 03:37:28 +02:00
Lennart Poettering
b79f817b1b man: refer to udevd by its service name not binary name
Since the binary name is now hidden away in /usr/lib/ the primary user
handle for the udev service is the unit name, hence change the man page
to be available under the unit name, and make the binary name an alias
for it.
2012-06-22 10:38:40 +02:00
Kay Sievers
f13b388f97 udev: install udevd as /usr/lib/systemd/systemd-udevd 2012-04-17 00:18:30 +02:00
Kay Sievers
6ada823a9a udev: remove configuration options for /dev, /sys, /run directories 2012-04-16 19:20:57 +02:00
Kay Sievers
b45f770f00 udev: clarify man page regarding starting dameons 2012-04-14 21:53:26 +02:00
Kay Sievers
07cd4fc168 udev: remove support for /lib/udev/devices/; tmpfiles should be used 2012-04-08 16:50:16 +02:00
Kay Sievers
d3a2386d15 man: update udev man pages 2012-04-04 14:42:32 +02:00
Kay Sievers
3e2147858f move imported udev into place 2012-04-04 05:05:07 +02:00