summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2012-11-22Make udevlibexecdir be substituted out of configure and assigned ↵Ian Stakenvicius
${rootlibdir}/udev instead of ${root}/lib/udev
2012-11-20udev: allow helpers to be in /lib/udevEgor Y. Egorov
Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-20udev: add /lib/udev/rules.d to rules directoriesMichał Górny
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>
2012-11-20Fix NULL pointer deference in udev_hwdb_get_properties_list_entryFelipe Contreras
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>
2012-11-20Reintroduce keymaps build and testAnthony G. Basile
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>
2012-11-19Reintroduce blkid-builtinRichard Yao
The build failure that prompted its removal has been resolved. Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-19Check for unshare on the configure and provide an inline replacement when ↵klondike
not available
2012-11-18Add missing #include <sys/syscall.h>Richard Yao
A last minute change to commit 189d09a42e054bebd91ea9690fede33b41996260 caused a build failure. This fixes it. Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-18Define unshare() macro to avoid dependence on __GNU_SOURCERichard Yao
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>
2012-11-18Include dev-setup.h and cgroup-util.h to explicitly declare functionsRichard Yao
Clang 3.1 indicated that we had implicitly declared several, which is illegal in C99. Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-18Fix "attribute 'packed' is ignored" warnings when using ClangRichard Yao
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>
2012-11-18Fix wrong format warningsKacper Kowalik (Xarthisius)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-11-18Fix unused result warningsKacper Kowalik (Xarthisius)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-11-18Fix implicit declaration warningKacper Kowalik (Xarthisius)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-11-18Got helper in src/* and make distcheck workingAnthony G. Basile
2012-11-17Restructure src/ as per lu_zeroAnthony G. Basile
2012-11-17Fix all Makefile.am: work towards 'make distcheck' sanityAnthony G. Basile
2012-11-17Rename src/shared to src/include, a saner nameAnthony G. Basile
2012-11-17udev: firmware - disable firmware loading when firmware file is 0 byteUmut Tezduyar
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.
2012-11-17Add missing HAVE_ACL preprocessor directivesRichard Yao
This fixes a build failure with --disable-acl Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-11-17src/test: disable for now to get a full buildAnthony G. Basile
2012-11-17Eliminate blkid-builtinRichard Yao
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>
2012-11-17Eliminate kmod dependencyRichard Yao
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>
2012-11-17src/gudev: builds successfullyAnthony G. Basile
2012-11-17src/udev: breakout Makefile.am for helpersAnthony G. Basile
2012-11-17src/udev: continue restoring needed depsAnthony G. Basile
2012-11-16src/udev: restore needed deps from src/shareAnthony G. Basile
2012-11-16src/udev/log.c: remove log_parse_environment()Anthony G. Basile
2012-11-16src/udev/Makefile.am: work towards fixing up udev buildAnthony G. Basile
2012-11-16src/udev: work towards building udevAnthony G. Basile
2012-11-15src/libudev: successfully buildsAnthony G. Basile
2012-11-15Final step of revamping the build systemAnthony G. Basile
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.
2012-11-15Second step of revamping the build systemAnthony G. Basile
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.
2012-11-15Isolation of udev code from remaining systemdAnthony G. Basile
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>
2012-11-14build-sys: store journald code in a noinst libraryZbigniew Jędrzejewski-Szmek
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.
2012-11-14timedatectl: break line to not exceed 80 columnsZbigniew Jędrzejewski-Szmek
2012-11-14shared: add API for replacing @FOO@ style variables in stringsLennart Poettering
2012-11-14util: add strreplace() to replace a substring by another stringLennart Poettering
2012-11-14specifier: minor modernizationsLennart Poettering
2012-11-14polkit: fix type on comparisonLennart Poettering
2012-11-14delta.c: fix option '-t'Thomas Hindoe Paaboel Andersen
Both the help and man page claims that it accepts -t with an argument so let's do that.
2012-11-13delta.c: use _cleanup_Thomas Hindoe Paaboel Andersen
2012-11-13python: add journal backend for the logging frameworkMarti Raudsepp
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 ]
2012-11-13systemd-analyze: use argparse instead of getoptZbigniew Jędrzejewski-Szmek
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.
2012-11-13systemd-python: fix nesting of #ifs and #pragmasZbigniew Jędrzejewski-Szmek
2012-11-13shared/socket-util: kill gcc warning about uninitialized variableZbigniew Jędrzejewski-Szmek
The warning was invalid, but distracting.
2012-11-13udev: properly handle symlink removal by 'change' eventKay Sievers
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.
2012-11-13libudev: avoid leak during realloc failureMauro Dreissig
2012-11-12remove duplicate semicolonsThomas Hindoe Paaboel Andersen
2012-11-12util: nicer tree drawingsMichal Schmidt
Draw trees more similar to pstree/findmnt/lsblk/...