Age | Commit message (Collapse) | Author |
|
|
|
Spotted by Andreas Henriksson.
|
|
No functional change.
Found by Coverity. Fixes CID #1237533.
|
|
No functional change, just log the warning.
Fonud by Coverity. Fixes CID #1237544.
|
|
Fonud by Coverity. Fixes CID #996255.
|
|
One reported by Coverity. Fixes CID #996252.
|
|
Found by Coverity. Fixes CID #1238780.
|
|
|
|
If a device does not have a major/minor number attached, we use different
database names than if it does. On "change" events, we didn't copy the
devnum over, therefore, we used different paths than on 'add' or 'remove'
events (where devnum was properly copied).
Fix this by always copying the devnum into the udev-device.
(David: added commit-log from email)
|
|
|
|
This fixes CID #1237641.
|
|
|
|
If the file is found to be empty, we exit early without closing the file first.
Found by coverity. Fixes CID #1237759.
|
|
|
|
|
|
Use rmdir_parents() from src/shared instead.
|
|
Use shared versions instead. Difference is with overwriting of repeated user/group
name, and lack of logging.
|
|
Processes expecting static nodes to have the right permissions may order themselves after systemd-udevd.service,
make sure that actually guarantees what is expected.
|
|
This delays label_init(), and drops the (duplicate) printing of version
information.
|
|
Also move the rest of event initialization next to the event loop (no functional change).
|
|
Rather than printing debug output to stderr and redirecting this to /dev/null when not wanted,
use the correct log_*() function in the first place.
|
|
Once upon a time logging during early boot was unreliable, so extra logging messages were
sent by udev to stderr. That is no longer a concern, so drop all fprintf() calls from udved.
|
|
Also rename some global variables to arg_* to make it clearer where they come from.
|
|
|
|
|
|
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.
|
|
Some kernel modules still take more than one minute to insmod, we no longer rely on the timeout
killing insmod within a given period of time, so just bump this to a much higher value. Its only
purpose is to make sure that nothing stays aronud forever.
|
|
|
|
The only remaining user was 'starting version XXX', which is now logged using log_info().
|
|
As of 3.17, the kernel will do this on its own, so just do regular log_debug() logging from udev.
|
|
|
|
Creating the rtnl context is cheap, but freeing it may not be, due to
synchronous close().
Also drop some excessive logging. We now log about the changing ifname
exactly once.
|
|
|
|
|
|
|
|
|
|
|
|
fprintf() does not add new-lines automatically like log_*() does. Add the
missing \n specified so "udevadm" invoked without arguments adds a newline
to:
udevadm: missing or unknown command
|
|
Based on a patch from Simon McVittie <simon.mcvittie@collabora.co.uk>.
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758050
|
|
Reported by: master.nosferatu@gmail.com
|
|
|
|
Don't exit the name-finding loop when the 'kernel' policy is detected. We should
still find a fallback name if possible in the (very likely) case that no kernel
name is set at all.
|
|
Don't overflow 80 cols unneccessarily (we are ok with doing it when it improves readability, but that's not the case here).
|
|
|
|
|
|
from udev tools
|
|
Newer kernels export meta-information about the origin of an ifname. Respect this
from the ifname rename logic. We do not rename any interfaces that was originally
named by userspace, nor once which have already been renamed from userspace.
Moreover, we optionally do not (the default) rename interfaces which the kernel
claims to have named in a predictable way.
|
|
Like with the old udev rules, allow hwdb entries to specify numeric key codes.
Based on a patch from Mircea Miron.
https://launchpad.net/bugs/1247584
|
|
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1321816
|
|
getopt is usually good at printing out a nice error message when
commandline options are invalid. It distinguishes between an unknown
option and a known option with a missing arg. It is better to let it
do its job and not use opterr=0 unless we actually want to suppress
messages. So remove opterr=0 in the few places where it wasn't really
useful.
When an error in options is encountered, we should not print a lengthy
help() and overwhelm the user, when we know precisely what is wrong
with the commandline. In addition, since help() prints to stdout, it
should not be used except when requested with -h or --help.
Also, simplify things here and there.
|