Age | Commit message (Collapse) | Author |
|
${rootlibdir}/udev instead of ${root}/lib/udev
|
|
Signed-off-by: Richard Yao <ryao@gentoo.org>
|
|
This adds /lib if split-usr is enabled
to the directories where udev searches for rules.d.
This is needed if split-usr is enabled because some software still
installs rules in /lib/udev/rules.d.
Signed-off-by: Richard Yao <ryao@gentoo.org>
|
|
It is possible for udev_hwdb_get_properties_list_entry to be invoked
during udevd initialization before hwdb has been initialized. We
workaround that for now by introducing a check to handle that.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Commit-message-by: Richard Yao <ryao@gentoo.org>
|
|
This commit reintroduces code to
1) build src/keymap
2) test keymap/Makefile.am that it has all the key maps listed
3) test that all the key names in keymap/* are in <linux/input.h>
4) do a syntax check on rules/*.rules which now includes
95-keymap.rules and 95-keyboard-force-release.rules
For #4, the regex expressions in rule-syntax-check.py had to be
updated. They do not allow trailing comments via # comment, and
I did not include that. A rule in 95-keymap.rules had to have its
comment moved from the end to another line.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
The build failure that prompted its removal has been resolved.
Signed-off-by: Richard Yao <ryao@gentoo.org>
|
|
not available
|
|
A last minute change to commit 189d09a42e054bebd91ea9690fede33b41996260
caused a build failure. This fixes it.
Signed-off-by: Richard Yao <ryao@gentoo.org>
|
|
unshare() is a linux syscall that we need. Unfortunately, access to it
depends on __GNU_SOURCE, which we would like to avoid. As such, we
define a macro to invoke it by its syscall code. This is necessary to
avoid the following warning from Clang:
implicit declaration of function 'unshare' is invalid in C99
[-Wimplicit-function-declaration]
Signed-off-by: Richard Yao <ryao@gentoo.org>
|
|
Clang 3.1 indicated that we had implicitly declared several, which is
illegal in C99.
Signed-off-by: Richard Yao <ryao@gentoo.org>
|
|
Clang 3.1 warned that "attribute 'packed' is ignored". This stems from
placing "__attribute__ ((packed))" at the start of structure
declarations when common practice is to place it at the end.
Signed-off-by: Richard Yao <ryao@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
|
|
|
|
|
|
|
|
If firmware file is not found in the file system, udev
terminates firmware loading. This is not the case if
firmware file exists in the file system but doesn't have
any data in it.
|
|
This fixes a build failure with --disable-acl
Signed-off-by: Richard Yao <ryao@gentoo.org>
|
|
|
|
Changes to rules were introduced by
7c2dee4a4d7f1b264031daaee786a8fe429884e1 while builtin-blkid support was
introduced in other commits. The removal of systemd resulted in this
code causing linker errors. This code adds complexity with no clear
benefit, so we remove it.
Signed-off-by: Richard Yao <ryao@gentoo.org>
|
|
Changes to rules were introduced by
06316d9f1a91b4d3efdb7402e72498cb3deb1806 while kmod support was
introduced in other commits. A ton of commits were made involving kmod
and it is quite clear that it is broken, so we remove it.
This changes our rules to depend on modprobe. As long as the modprobe
binary is in /, and not /usr, udev module loading should function
properly.
Signed-off-by: Richard Yao <ryao@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The structure of the source tree is basically correct and this is
about as far as we can go without hacking at the C code.
|
|
The original Makefile.am was drawn to the top level. This commit
breaks it out into the various directories with SUBDIRS connecting
them. This makes each directory easier to maintain.
|
|
This commit is a first attempt to isolate the udev code from the
remaining code base. It intentionally does not modify any files
but purely delete files which, on a first examination, appear to
not be needed. This is a sweeping commit which may easily have
missed needed code. Files can be retrieved by doing a checkout
from the previous commit:
git checkout 2944f347d0 -- <filename>
|
|
The point is to allow the use of journald functions by other binaries.
Before, journald code was split into multiple files (journald-*.[ch]),
but all those files all required functions from journald.c. And
journald.c has its own main(). Now, it is possible to link against
those functions, e.g. from test binaries.
This constitutes a fix for https://bugzilla.redhat.com/show_bug.cgi?id=872638.
The patch does the following:
1. rename journald.h to journald-server.h and move corresponding code
to journald-server.c.
2. add journald-server.c and other journald-*.c parts to
libsystemd-journal-internal.
3. remove journald-syslog.c from test_journal_syslog_SOURCES, since
it is now contained in libsystemd-journal-internal.
There are no code changes, apart from the removal of a few static's,
to allow function calls between files.
|
|
|
|
|
|
|
|
|
|
|
|
Both the help and man page claims that it accepts -t with an argument
so let's do that.
|
|
|
|
Supports Python versions 2.6 through 3.3 (tested on 2.7 and 3.2).
See JournalHandler docstring for usage details.
[zj: - use send() instead of using sendv() directly
- do exception handling like in the logging module
- bumped min version to python2.6, since the module
does not work with python2.5 anyway ]
|
|
Makes the output way nicer with shorter code. Also brings
systemd-analyze behaviour more in line with other systemd-programs.
Argparse is in Python since 2.6, and is available as a package for
previous versions, if someone is stuck with very old Python.
|
|
|
|
The warning was invalid, but distracting.
|
|
If a 'change' event is supposed to remove created symlinks, we create
a new device structure from the sysfs device and fill it with the list
of links, to compute the delta of the old and new list of links to apply.
If the device is already 'remove'd by the kernel though, udev fails to
create the device structure, so the links are not removed properly.
> From: Neil Brown <nfbrown@suse.com>
> Date: Thu, 8 Nov 2012 10:39:06 +0100
> Subject: [PATCH] If a 'change' event does not get handled by udev until
> after the device has subsequently disappeared, udev mis-handles
> it. This can happen with 'md' devices which emit a change
> event and then a remove event when they are stopped. It is
> normally only noticed if udev is very busy (lots of arrays
> being stopped at once) or the machine is otherwise loaded
> and reponding slowly.
>
> There are two problems.
>
> 1/ udev_device_new_from_syspath() will refuse to create the device
> structure if the device does not exist in /sys, and particularly if
> the uevent file does not exist.
> If a 'db' file does exist, that is sufficient evidence that the device
> is genuine and should be created. Equally if we have just received an
> event from the kernel about the device, it must be real.
>
> This patch just disabled the test for the 'uevent' file, it doesn't
> try imposing any other tests - it isn't clear that they are really
> needed.
>
> 2/ udev_event_execute_rules() calls udev_device_read_db() on a 'device'
> structure that is largely uninitialised and in particular does not
> have the 'subsystem' set. udev_device_read_db() needs the subsystem
> so it tries to read the 'subsystem' symlink out of sysfs. If the
> device is already deleted, this naturally fails.
> udev_event_execute_rules() knows the subsystem (as it was in the
> event message) so this patch simply sets the subsystem for the device
> structure to be loaded to match the subsystem of the device structure
> that is handling the event.
>
> With these two changes, deleted handling of change events will still
> correctly remove any symlinks that are not needed any more.
Use udev_device_new() instead of allowing udev_device_new_from_syspath()
to proceed without a sysfs device.
|
|
|
|
|
|
Draw trees more similar to pstree/findmnt/lsblk/...
|