summaryrefslogtreecommitdiff
path: root/src/shared/udev-util.h
Commit message (Collapse)AuthorAge
* udev: add helper udev_device_new_from_stat_rdev()Lennart Poettering2018-08-24
| | | | | | This is a simple wrapper around udev_device_new_from_devnum(), and uses the data from a struct stat's .st_rdev field to derive the udev_device object.
* tree-wide: drop redundant _cleanup_ macros (#8810)Lennart Poettering2018-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This drops a good number of type-specific _cleanup_ macros, and patches all users to just use the generic ones. In most recent code we abstained from defining type-specific macros, and this basically removes all those added already, with the exception of the really low-level ones. Having explicit macros for this is not too useful, as the expression without the extra macro is generally just 2ch wider. We should generally emphesize generic code, unless there are really good reasons for specific code, hence let's follow this in this case too. Note that _cleanup_free_ and similar really low-level, libc'ish, Linux API'ish macros continue to be defined, only the really high-level OO ones are dropped. From now on this should really be the rule: for really low-level stuff, such as memory allocation, fd handling and so one, go ahead and define explicit per-type macros, but for high-level, specific program code, just use the generic _cleanup_() macro directly, in order to keep things simple and as readable as possible for the uninitiated. Note that before this patch some of the APIs (notable libudev ones) were already used with the high-level macros at some places and with the generic _cleanup_ macro at others. With this patch we hence unify on the latter.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* Prep v236 : Add missing SPDX-License-Identifier (6/9) src/sharedSven Eden2018-03-26
|
* Rip out setting of the log level from udev_new and put it in a new functionZbigniew Jędrzejewski-Szmek2017-07-25
| | | | | | | | This function is internal to elogind code, so external users of libudev will not see those log messages. I think this is better. If we want to allow that, the function could be put in libudev and exported. v2: check that the string is more than one char before stripping quotes
* Prep v230: Apply missing upstream fixes and updates (7/8) src/shared.Sven Eden2017-06-16
|
* tree-wide: remove Emacs lines from all filesDaniel Mack2017-05-17
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* Prep v228: Condense elogind source masks (5/5)Sven Eden2017-04-26
|
* Prep v228: Substitute declaration masks (4/4)Sven Eden2017-04-26
|
* Remove unused and invalid udev definitionsSven Eden2017-03-14
| | | | | | | | | These definitions were not valid when compiling against eudev. As a nice consequence, our own copies of any udev includes are no longer needed and could be removed for good. Add label.h include to logind.c, as "udev.h" is no longer available which would have done so otherwise.
* Prep v225: Applying various fixes and changes to src/shared that got lost ↵Sven Eden2017-03-14
| | | | during git am transfer.
* Remove unused and invalid udev definitionsAndy Wingo2017-03-14
| | | | These definitions were not valid when compiling against eudev.
* udevd: make udev_ctrl_connection globalTom Gundersen2017-03-14
| | | | | This allows us to simplify the ctrl_msg handler. Eventually all this global state should move to a Manager object or so.
* Remove unused and invalid udev definitionsAndy Wingo2015-04-20
| | | | These definitions were not valid when compiling against eudev.
* Compiling.Andy Wingo2015-04-08
|
* udev: builtin-hwdb - port to sd-hwdbTom Gundersen2014-12-15
|
* shared: udev-util - add hwdb cleanup macroTom Gundersen2014-12-02
|
* udev: remove seqnum API and all assumptions about seqnumsKay Sievers2014-04-13
| | | | | | | | | | | | The way the kernel namespaces have been implemented breaks assumptions udev made regarding uevent sequence numbers. Creating devices in a namespace "steals" uevents and its sequence numbers from the host. It confuses the "udevadmin settle" logic, which might block until util a timeout is reached, even when no uevent is pending. Remove any assumptions about sequence numbers and deprecate libudev's API exposing these numbers; none of that can reliably be used anymore when namespaces are involved.
* udevadm: modernizationZbigniew Jędrzejewski-Szmek2013-12-18
|
* util: allow trailing semicolons on define_trivial_cleanup_func linesLennart Poettering2013-10-14
| | | | | | | | | | | | | | | | Emacs C indenting really gets confused by these lines if they carry no trailing semicolon, hence let's make this nicer for good old emacs. The other macros which define functions already do this too, so let's copy the scheme here. Also, let's use an uppercase name for the macro. So far our rough rule was that macros that are totally not function-like (like this ones, which define a function) are uppercase. (Well, admittedly it is a rough rule only, for example function and variable decorators are all lower-case SINCE THE CONSTANT YELLING IN THE SOURCES WOULD SUCK, and also they at least got underscore prefixes.) Also, the macros that define functions that we already have are all uppercase, so let's do the same here...
* Introduce udev object cleanup functionsZbigniew Jędrzejewski-Szmek2013-10-13