summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-03-18libudev: udev_device_read_db - drop unused argumentTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18libudev: udev_device_add_property - implicitly mark properties for saving to dbTom Gundersen
Note: We also ported touch() and touch_file() from upstream. -AGB. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18udev/libudev: event - move {OLD_,}INTERFACE handling from udevd to libudevTom Gundersen
This should be internal to the library as it is only about reflecting the sysfs state in the udev_device. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18udev: simplify event_queue_update() and add debug loggingTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18udev: use inttypes.h types wherever appropriateLennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18tree-wide: use _packed_ macro instead of raw gcc __attribute__Lennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18udevd: close race in udev settleTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18v4l_id: use standard option parsing loopZbigniew Jędrzejewski-Szmek
Not terribly important, but the loop wasn't an actual loop, making coverity unhappy. CID #1261725. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18shared: import close_many() from upstreamAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01shared: introduce cmsg_close_all() callLennart Poettering
The call iterates through cmsg list and closes all fds passed via SCM_RIGHTS. This patch also ensures the call is used wherever appropriate, where we might get spurious fds sent and we should better close them, then leave them lying around. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11src/udev/udev-event.c: clean up net if renaming codeAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11src/udev/udev-builtin.c: remove legacy optional keymapAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11src/udev/udev-builtin-kmod.c: remove the modprobe alt to kmod codeAnthony G. Basile
2015-02-11src/udev/udevd.c: remove create static nodes from modulesAnthony G. Basile
2015-02-11Minor cleanupsAnthony G. Basile
2015-02-11libudev: private - drop some functions from the internal APITom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11udev: event - move renaming of udev_device to libudevTom Gundersen
This is not exposed in the public API. We want to simplify the internal libudev-device API as much as possible so that it will be simpler to rip the whole thing out in the future. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11rule_generator: remove legacy codeAnthony G. Basile
2015-02-08libudev: monitor - move nulstr parsing to libudev-deviceTom Gundersen
Hide the details a bit. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08util: rework strappenda(), and rename it strjoina()Lennart Poettering
After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08udev: event - minor nitTom Gundersen
Stay uniform and use 'dev' rather than 'event->dev', as these are aliases (and event->dev looks like it may be a typo for event->dev_db). Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08udev: event - introduce and use internal udev_device_shallow_clone()Tom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25build-sys: fix build on compilers without static_assertZbigniew Jędrzejewski-Szmek
Build would fail when assert was used on the same line in different files #included together. https://bugs.freedesktop.org/show_bug.cgi?id=87339 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25src/shared/util.h: only define the _to_string() enum mapping functionLennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25src/shared/util.h: further cleanup PID_FMTAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25Fix some format strings for enums, they are signedZbigniew Jędrzejewski-Szmek
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25shared/util: use signed printf format for PIDsZbigniew Jędrzejewski-Szmek
gcc 5 started warning about this. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25log: add new log output mode, that prints to console, butLennart Poettering
prefixes with syslog priority This is useful when we execute our own programs, reading output from its STDERR, and want to retain priority information. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25util: Add some missing hidden_file() suffixesMartin Pitt
dpkg itself also uses *.dpkg-dist, while .dpkg-{bak,backup,remove} are being used by dpkg-maintscript-helper. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25Move DEFINE_TRIVIAL_CLEANUP_FUNC to macro.hZbigniew Jędrzejewski-Szmek
This remove the need for various header files to include the (relatively heavyweight) util.h. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25Add initialization helper for file_handle_unionZbigniew Jędrzejewski-Szmek
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25libudev: fix check for too long packetTopi Miettinen
Don't use recvmsg(2) return value to check for too long packets (it doesn't work) but MSG_TRUNC flag. (David: add parantheses around condition) Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25Assorted format fixesZbigniew Jędrzejewski-Szmek
Types used for pids and uids in various interfaces are unpredictable. Too bad. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25src/shared/util.{c,h}: fix build when mkostemp is not supportedPeter Seiderer
Not all instance of mkostemp were protected with #ifndef HAVE_DECL_MKOSTEMP. We fix this for the definition of the wrapper mkostemp_safe() in the c file and in the header. Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-23Merge pull request #104 from tseeker/remove-unused-libmblueness
Build files: remove extraneous dependency
2015-01-21Build files: remove extraneous dependencyEmmanuel Benoît
* configure.ac: use LT_LIBM to check for the maths library * src/accelerometer/Makefile.am: use $(LIBM) instead of -lm in the link flags This causes all executables (except accelerometer) and libraries to be linked without libm, which they do not need.
2015-01-21src/ata_id/Makefile.am: Fixed compilation errorEmmanuel Benoît
It is necessary to include src/udev to the include path, because ata_id.c includes src/shared/udev-util.h which itself includes src/udev/udev.h
2015-01-21Merge pull request #99 from zaufi/masterblueness
Remove some garbage code inherited from `systemd`
2015-01-17src/udev/Makefile.am: fix build wrt udev-builtin-evdev_id.cAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17log: fix log_full_errno() with custom facilitiesDavid Herrmann
Make sure to extract the log-priority when comparing against max-log-level, otherwise, we will always drop those messages. This fixes bus-proxyd to properly send warnings on policy blocks. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17path-util: plug leakTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17udev: merge evdev_id into input_idDavid Herrmann
There is no reason to keep both separated. We want to avoid API specific tools and instead keep generic terms like 'input'. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17udev: fix NULL-ptr derefDavid Herrmann
Make sure we properly validate the return value of udev_device_get_sysattr_value(). It might be NULL for several reasons. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17udev: Add builtin/rule to export evdev information as udev propertiesCarlos Garnacho
This rule is only run on tablet/touchscreen devices, and extracts their size in millimeters, as it can be found out through their struct input_absinfo. The first usecase is exporting device size from tablets/touchscreens. This may be useful to separate policy and application at the time of mapping these devices to the available outputs in windowing environments that don't offer that information as readily (eg. Wayland). This way the compositor can stay deterministic, and the mix-and-match heuristics are performed outside. Conceivably, size/resolution information can be changed through EVIOCSABS anywhere else, but we're only interested in values prior to any calibration, this rule is thus only run on "add", and no tracking of changes is performed. This should only remain a problem if calibration were automatically applied by an earlier udev rule (read: don't). v2: Folded rationale into commit log, made a builtin, set properties on device nodes themselves v3: Use inline function instead of macro for mm. size calculation, use DECIMAL_STR_MAX, other code style issues v4: Made rule more selective v5: Minor style issues, renamed to a more generic builtin, refined rule further. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17udev: make use of new one_zero() helper where appropriateLennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17udevadm: don't hit an assert when obsolete parameters are passedLennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=1178051 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-10src/v4l_id: fix compile errorAnthony G. Basile
2015-01-07udevadm,..: make --help output of udev tools more like the output of the ↵Lennart Poettering
various other tools Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-07udev: improve help/usage for some more programsRobert Milasan
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-07accelerometer: display short options tooRobert Milasan
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>