summaryrefslogtreecommitdiff
path: root/src/udev
AgeCommit message (Collapse)Author
2015-02-18shared: 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.
2015-02-12include <poll.h> instead of <sys/poll.h>Thomas Hindoe Paaboel Andersen
include-what-you-use automatically does this and it makes finding unnecessary harder to spot. The only content of poll.h is a include of sys/poll.h so should be harmless.
2015-02-12Revert "tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC"Lennart Poettering
This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656. It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw sockets.
2015-02-11ata_id: remove unused header filesRobert Milasan
Signed-off-by: Robert Milasan <rmilasan@suse.com>
2015-02-10net: support globbing and disjunction in Match logicTom Gundersen
Match{Name,OrginalName,Type,Driver,Path} can now take a space-separated glob of matches.
2015-02-10tree-wide: Always use recvmsg with MSG_CMSG_CLOEXECCristian Rodríguez
2015-02-06udev: net_setup - clarify reason for failure of persistent mac address policyTom Gundersen
2015-02-03util: 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.
2015-01-26udev: 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).
2015-01-26udev: event - introduce and use internal udev_device_shallow_clone()Tom Gundersen
2015-01-26udev: 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.
2015-01-23#pragma once here and thereZbigniew Jędrzejewski-Szmek
2015-01-22Assorted format fixesZbigniew Jędrzejewski-Szmek
Types used for pids and uids in various interfaces are unpredictable. Too bad.
2015-01-15udev: 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'.
2015-01-15udev: 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.
2015-01-13udev: make use of new one_zero() helper where appropriateLennart Poettering
2015-01-12udev: link_config - modernize a bit and fix leakesTom Gundersen
Not all of the link_config struct was getting freed.
2015-01-11udev: 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.
2015-01-08udevadm: don't hit an assert when obsolete parameters are passedLennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=1178051
2015-01-06build-sys: add two more missing makefile linksLennart Poettering
2015-01-05udevadm,..: make --help output of udev tools more like the output of the ↵Lennart Poettering
various other tools
2015-01-01udev: improve help/usage for some more programsRobert Milasan
2014-12-30accelerometer: display short options tooRobert Milasan
2014-12-30accelerometer: drop unused -x optionRobert Milasan
2014-12-28tmpfiles: add new line type 'v' for creating btrfs subvolumesLennart Poettering
2014-12-25ata_id: remove temp variable to kill warningZbigniew Jędrzejewski-Szmek
src/udev/ata_id/ata_id.c:503:24: warning: assignment from incompatible pointer type identify_words = &identify.wyde; ^
2014-12-25ata_id: modernizeZbigniew Jędrzejewski-Szmek
2014-12-25udev: fix another strict aliasing issueShawn Paul Landden
2014-12-24util: fix strict aliasing violations in use of struct inotify_event v5Shawn Paul Landden
There is alot of cleanup that will have to happen to turn on -fstrict-aliasing, but I think our code should be "correct" to the rule.
2014-12-18systemd-hwdb: introduce new toolTom Gundersen
This pulls out the hwdb managment from udevadm into an independent tool. The old code is left in place for backwards compatibility, and easy of testing, but all documentation is dropped to encourage use of the new tool instead.
2014-12-16udev: net_setup - fix warningTom Gundersen
2014-12-15udev: builtin-hwdb - port to sd-hwdbTom Gundersen
2014-12-15udevadm: port to sd-hwdbTom Gundersen
2014-12-14blkid: Warn when rejecting a superblock with a bad csumGabriel de Perthuis
Bump libblkid requirement from 2.20 to 2.24. util-linux 2.25 is actually required since fdbbad981cc5da8bb4ed7e9b6646e7a114745ec5
2014-12-12udev-builtin-btrfs: properly initialize ioctl struct to zeroesLennart Poettering
2014-12-11use correct format typesThomas Hindoe Paaboel Andersen
2014-12-11treewide: correct spacing near eol in code commentsTorstein Husebø
2014-12-11libudev: make libudev-hwdb a wrapper around sd-hwdbTom Gundersen
2014-12-10core: unify how we iterate over inotify eventsLennart Poettering
Let's add some syntactic sugar for iterating through inotify events, and use it everywhere.
2014-12-08udev: link-config - simplify net-matchTom Gundersen
2014-12-05net_setup/networkd: warn if matching is done on possibly unstable ifnameTom Gundersen
2014-12-04udev: net_setup - allow matching on OriginalName=Tom Gundersen
This has been requested repeatedly, so let's give it a go. We explicitly do not allow matching on names that have already been changed (from a previous udev run, or otherwise), and matching on unpredictable names (ethX) is discouraged (but not currently disallowed). We also currently allow: [Match] Name=veth0 [Link] Name=my-name0 SomeOtherSetting=true Which means that the link file will be applied the first time it is invoked, but not on subsequent invocations, which may be surprising.
2014-12-04udevd: SAS: use SAS addr + PHY id in by-path whenever possible.Maurizio Lombardi
This patch changes the naming scheme for sas disks. The original names used disk's sas address and lun, the new scheme uses sas address of the nearest expander (if available) and a phy id of the used connection. If no expander is used, the phy id of hba phy is used. Note that names that refer to RAID or other abstract devices are unchanged. Name in raid configuration: hba_pci_address-sas-raid_sas_address-lunY-partZ Name in expander bare disk configuration: hba_pci_address-sas-expander_sas_address-phyX-lunY-partZ Name format without expanders: hba_pci_address-sas-phyX-lunY-partZ Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
2014-12-03udevd: don't take reference for NULL rtnl objectTom Gundersen
2014-11-30udev: strings in C are NUL-terminated anyway, no need to add a second NUL...Lennart Poettering
2014-11-28udev: rules - ignore the lack of trailing newlineTom Gundersen
Also accept '\r' as newline character. This dropps warnings of the type: invalid key/value pair in file /usr/lib/udev/rules.d/40-usb-media-players.rules on line 26, starting at character 25 ('')
2014-11-28udev: rules - print the first invalid characterTom Gundersen
The current code would print the character following the first invalid character. Given an udev rules-file without a trailing newline we would otherwise print garbage: invalid key/value pair in file /usr/lib/udev/rules.d/40-usb-media-players.rules on line 26, starting at character 25 ('m') This is now changed to print invalid key/value pair in file /usr/lib/udev/rules.d/40-usb-media-players.rules on line 26, starting at character 25 ('') (still not very good as printing \0 just gives the empty string)
2014-11-28udev: rules - modernise add_rule a bitTom Gundersen
2014-11-28udevadm hwdb: discard extra leading whitespaces in hwdbPeter Hutterer
Currently a property in the form of FOO=bar is stored as " FOO=bar", i.e. the property name contains a leading space. That's quite hard to spot. This patch discards all extra whitespaces but the first one which is required by libudev's hwdb_add_property. [zj: modify the check a bit] https://bugs.freedesktop.org/show_bug.cgi?id=82311
2014-11-28treewide: another round of simplificationsMichal Schmidt
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno + return simplifications".