Commit Graph

8 Commits

Author SHA1 Message Date
Yu Watanabe 1a0bd01529 udev: introduce new OPTIONS="log_level=" udev rule 2020-12-10 12:31:45 +09:00
Yu Watanabe 481f24d1f6 udev: drop meaningless size optimization
These objects are not allocated multiple times simultaneously per
single process.
2020-12-10 12:18:30 +09:00
Yu Watanabe f13467ec23 license: GPL-2.0+ -> GPL-2.0-or-later 2020-11-09 13:25:50 +09:00
Yu Watanabe 5eb6ef8b45 udev: udev_event_apply_format() always make buf NUL terminated
The return value of udev_event_apply_format() is always ignored.
So, the destination buffer must be always NUL terminated.
2020-06-18 13:53:08 +09:00
Michal Sekletár e209926778 udev: make signal that we use to kill workers on timeout configurable 2020-06-05 11:09:17 +02:00
Zbigniew Jędrzejewski-Szmek f85cc54c4b udev-rules: add precise information to rule failure logs
It is pretty hard to figure out what the problem actually is, esp. when the rule
is long.

On my machine:
systemd[1]: Starting udev Kernel Device Manager...
systemd-udevd[217399]: /usr/lib/udev/rules.d/11-dm-lvm.rules:40 Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
systemd-udevd[217399]: /usr/lib/udev/rules.d/11-dm-lvm.rules:40 The line takes no effect, ignoring.
systemd-udevd[217399]: /etc/udev/rules.d/60-ipath.rules:4 Invalid value "kcopy/%02n" for NAME (char 7: invalid substitution type), ignoring, but please fix it.
systemd-udevd[217399]: /usr/lib/udev/rules.d/65-md-incremental.rules:28 Invalid value "/sbin/mdadm -I $env{DEVNAME} --export $devnode --offroot ${DEVLINKS}" for IMPORT (char 58: invalid substitution type), ignoring, but please fix it.
systemd-udevd[217399]: /etc/udev/rules.d/73-special-net-names.rules:14 Invalid value "/bin/sh -ec 'D=${DEVPATH#*/vio/}; D=${D%%%%/*}; D=${D#????}; D=${D#0}; D=${D#0}; D=${D#0}; D=${D#0}; echo ${D:-0}'" for PROGRAM (char 16: invalid substitution type), ignoring, but please fix it.
systemd-udevd[217399]: /usr/lib/udev/rules.d/84-nm-drivers.rules:10 Invalid value "/bin/sh -c 'ethtool -i $1 | sed -n s/^driver:\ //p' -- $env{INTERFACE}" for PROGRAM (char 24: invalid substitution type), ignoring, but please fix it.
systemd-udevd[217399]: /usr/lib/udev/rules.d/90-libgpod.rules:19 IMPORT key takes '==' or '!=' operator, assuming '==', but please fix it.
systemd-udevd[217399]: /usr/lib/udev/rules.d/90-libgpod.rules:23 IMPORT key takes '==' or '!=' operator, assuming '==', but please fix it.
systemd-udevd[217399]: /usr/lib/udev/rules.d/99-vmware-scsi-udev.rules:5 Invalid value "/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'" for RUN (char 27: invalid substitution type), ignoring, but please fix it.
systemd-udevd[217399]: /usr/lib/udev/rules.d/99-vmware-scsi-udev.rules:6 Invalid value "/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'" for RUN (char 27: invalid substitution type), ignoring, but please fix it.
systemd[1]: Started udev Kernel Device Manager.
2019-06-28 16:20:48 +02:00
Yu Watanabe d7aee41db3 udev: check formatting of attribute or value earlier 2019-06-03 08:35:33 +09:00
Yu Watanabe 25de7aa7b9 udev: modernize udev-rules.c
This does the following:
- rename enum udev_builtin_cmd -> UdevBuiltinCmd
- rename struct udev_builtin -> UdevBuiltin
- move type definitions to udev-rules.h
- move prototypes of functions defined in udev-rules.c to udev-rules.h
- drop to use strbuf
- propagate critical errors in applying rules,
- drop limitation for number of tokens per line.
2019-06-02 14:15:26 +09:00
Renamed from src/udev/udev.h (Browse further)