Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
This breaks udev-builtin-btrfs.c, which reinvents some of missing.h,
so use missing.h there too.
[zj: removed #include "config.h" and wrapped #include <linux/btrfs.h>
in ifdef HAVE_LINUX_BTRFS_H as discussed on the mailing list.]
|
|
This reverts commit a56ba6158b9649e01226dfaf3ff7082c82571090.
The commit was pushed in error.
|
|
|
|
In practice this shouldn't make much difference, but
sometimes our headers might be newer, and we want to
test them.
|
|
We generally have separate man pages for all configuration files.
In this case udev.conf was already described in systemd-udevd.service(8),
but it was hard to find. Docbook makes it hard to add a .so link from
a different section, so describe udev.conf in its own page.
|
|
String which ended in an unfinished quote were accepted, potentially
with bad memory accesses.
Reject anything which ends in a unfished quote, or contains
non-whitespace characters right after the closing quote.
_FOREACH_WORD now returns the invalid character in *state. But this return
value is not checked anywhere yet.
Also, make 'word' and 'state' variables const pointers, and rename 'w'
to 'word' in various places. Things are easier to read if the same name
is used consistently.
mbiebl_> am I correct that something like this doesn't work
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"'
mbiebl_> systemd seems to strip of the quotes
mbiebl_> systemctl status shows
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS $RootDir $MountPoint
mbiebl_> which is pretty weird
|
|
Commit dd5eddd28a74a49607a8fffcaf960040dba98479 accidentally
removed one line too many.
|
|
|
|
|
|
Some events take longer than the default 30 seconds. Killing those
events will leave the machine halfway configured.
Add a commandline option '--event-timeout' to handle these cases.
|
|
MD instantiates devices at open(). This is incomptible with the
locking logic, as the "change" event emitted when stopping a
device will bring it back.
|
|
If we want to avoid reading a totally empty file, it seems better
to check after we have opened the file, not before.
|
|
Special care is needed so that we get an error message if the
file failed to parse, but not when it is missing. To avoid duplicating
the same error check in every caller, add an additional 'warn' boolean
to tell config_parse whether a message should be issued.
This makes things both shorter and more robust wrt. to error reporting.
|
|
|
|
Instead of waiting for new data from the sensor, which might be
a long time coming, depending on the sensor device, ask the kernel
for the last state for that particular input device.
|
|
Otherwis, we get misleading error messages on links with MACs.
Reported by Leonid Isaev.
|
|
|
|
Let's tell users what is going wrong.
|
|
For network devices on the same PCI function, dev_id should not be used,
since its purpose is for IPv6 support on interfaces with the same MAC
address.
The new dev_port sysfs attribute should be used instead of dev_id.
|
|
descriptor
|
|
|
|
static bool enable_name_policy(...) in ./src/udev/net/link-config.c
calls proc_cmdline(...) to get "line" initialized, but
proc_cmdline(...) does not guarantee that atleast when both
conditions (detect_container(NULL) > 0) and
read_full_file(...) returned < 0.
|
|
The return value from udev_enumerate_scan_devices was stored but
never used. I assume this was meant to be checked.
|
|
Arguments were wrong order, no?
This fixes commits:
e918a1b5a94f270186dca59156354acd2a596494
3d06f4183470d42361303086ed9dedd29c0ffc1b
|
|
|
|
The kernel will return 0 for REREADPT when no partition table
is found, we have to send out "change" ourselves.
|
|
|
|
mounted partitions:
# dd if=/dev/zero of=/dev/sda bs=1 count=1
UDEV [4157.369250] change .../0:0:0:0/block/sda (block)
UDEV [4157.375059] change .../0:0:0:0/block/sda/sda1 (block)
UDEV [4157.397088] change .../0:0:0:0/block/sda/sda2 (block)
UDEV [4157.404842] change .../0:0:0:0/block/sda/sda4 (block)
unmounted partitions:
# dd if=/dev/zero of=/dev/sdb bs=1 count=1
UDEV [4163.450217] remove .../target6:0:0/6:0:0:0/block/sdb/sdb1 (block)
UDEV [4163.593167] change .../target6:0:0/6:0:0:0/block/sdb (block)
UDEV [4163.713982] add .../target6:0:0/6:0:0:0/block/sdb/sdb1 (block)
|
|
Reported by Kay.
|
|
This should make sure that fdisk-like programs will automatically
cause an update of all partitions, just like mkfs-like programs cause
an update of the partition.
|
|
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=79576
|
|
I am getting
"Error calling EVIOCSKEYCODE (scan code 0xc022d, key code 418): Invalid
argument", the error message does not tell on which specific device the
problem is, add that info.
|
|
If the udev queue is empty and "/run/udev/queue" does not exist,
"udevadm settle" would return with EXIT_FAILURE, because the inotify on
"/run/udev/queue" would fail with ENOENT.
This patch lets "udevadm settle" exit with EXIT_SUCCESS in this case.
|
|
After 1ea972174baba40dbc80c51cbfc4edc49764b59b err is no longer
set unless we hit a special case. Initialize it to 0 and remove
a check that will never fail.
|
|
No functional change expected :)
|
|
|
|
Before:
30,997,4553484,-;systemd-udevd[439]: renamed network interface wwan0 to wwp0s20u4i6systemd-udevd[439]: renamed network interface wlan0 to wlp3s0
30,998,1175077801,c;systemd-udevd[2345]: renamed network interface wwan0 to wwp0s20u4i6
After:
30,834,4553484,-;systemd-udevd[439]: renamed network interface wwan0 to wwp0s20u4i6
30,835,4732949,-;systemd-udevd[439]: renamed network interface wlan0 to wlp3s0
30,988,1175077801,-;systemd-udevd[2345]: renamed network interface wwan0 to wwp0s20u4i6
|
|
Under some conditions, in udev_rules_apply_to_event the fact that
result is 1024 bytes, creates problems if the output of the running
command/app is bigger then 1024 bytes.
|
|
|
|
The address may be already changed by other processes, or set
when creating the netdev from userspace.
|
|
|