summaryrefslogtreecommitdiff
path: root/src/udev/udevadm-trigger.c
Commit message (Collapse)AuthorAgeFilesLines
...
* udevadm: use dispatch_verb() and drop udevadm_cmd structYu Watanabe2018-09-101-7/+2
|
* udev: drop unused udev structYu Watanabe2018-09-101-6/+6
|
* udev: move udev cleanup functions from udev-util.h to udev.hYu Watanabe2018-08-231-1/+0
|
* tree-wide: drop empty lines in commentsYu Watanabe2018-07-231-3/+0
|
* tree-wide: drop copyright headers from frequent contributorsZbigniew Jędrzejewski-Szmek2018-06-201-1/+0
| | | | | | | | Fixes #9320. for p in Shapovalov Chevalier Rozhkov Sievers Mack Herrmann Schmidt Rudenberg Sahani Landden Andersen Watanabe; do git grep -e 'Copyright.*'$p -l|xargs perl -i -0pe 's|/([*][*])?[*]\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\s*[*]([*][*])?/\n*|\n|gms; s|\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\n*|\n|gms' done
* Drop more license boilerplateZbigniew Jędrzejewski-Szmek2018-06-141-12/+0
| | | | | | | | $ git grep -e 'This program is free software' -l |grep -v LICENSE | \ xargs perl -i -0pe 's/ \* This program.*?for more details.\s*\*\n( \* You should have.*licenses.>.\n)?//gms' For some reason they were missed previously. All those files seem to have proper SDPX tags.
* tree-wide: use proper unicode © instead of (C) where we canLennart Poettering2018-06-141-1/+1
| | | | | | Let's use a proper unicode copyright symbol where we can, it's prettier. This important patch is very important.
* tree-wide: drop redundant _cleanup_ macros (#8810)Lennart Poettering2018-04-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* udevadm: fix fd leak on oomZbigniew Jędrzejewski-Szmek2018-02-151-2/+3
| | | | | | Unlikely, but let's be correct. CID #1386003.
* udevadm: check for oom and other style fixesZbigniew Jędrzejewski-Szmek2018-02-091-11/+19
|
* udevadm: allow trigger command to be synchronousMao2018-02-091-8/+89
| | | | | | | | | | | | | | | | | | | | There are cases that we want to trigger and settle only specific commands. For example, let's say at boot time we want to make sure all the graphics devices are working correctly because it's critical for booting, but not the USB subsystem (we'll trigger USB events later). So we do: udevadm trigger --action="add" --subsystem-match="graphics" udevadm settle However, we cannot block the kernel from emitting kernel events from discovering USB devices. So if any of the USB kernel event was emitted before the settle command, the settle command would still wait for the entire queue to complete. And if the USB event takes a long time to be processed, the system slows down. The new `settle` option allows the `trigger` command to wait for only the triggered events, and effectively solves this problem.
* udevadm: getopt() and help message cleanupYu Watanabe2017-12-051-3/+7
| | | | | | | | | This adds missing options, mainly '--version' in getopt(), removes an unused option from getopt(). Also, this adds a deprecate message in `udevadm hwdb`, and cleanups help messages. Follow-up for 65eb4378c3e1de25383d8cd606909e64c71edc80.
* Add SPDX license identifiers to source files under the GPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
|
* udevadm,basic: replace nulstr_contains with STR_IN_SET (#6965)Zbigniew Jędrzejewski-Szmek2017-10-041-1/+1
| | | | | | | | | | | | | | | | STR_IN_SET is a newer approach which is easier to write and read, and which seems to result in space savings too: before: 4949848 build/src/shared/libsystemd-shared-234.so 350704 build/systemctl 4967184 build/systemd 826216 build/udevadm after: 4949848 build/src/shared/libsystemd-shared-234.so 350704 build/systemctl 4966888 build/systemd 826168 build/udevadm
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* udev: add emacs header lineZbigniew Jędrzejewski-Szmek2015-12-071-0/+2
| | | | | Otherwise emacs wants to use 2-space indentation and other attrocities.
* util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering2015-10-241-5/+6
| | | | | | | | | | | | | | string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
* udevadm: trigger - check return valuesTom Gundersen2015-06-231-11/+51
| | | | Fixes CID#1296243.
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-231-7/+0
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* udevadm,..: make --help output of udev tools more like the output of the ↵Lennart Poettering2015-01-051-18/+21
| | | | various other tools
* treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt2014-11-281-1/+1
| | | | | | | | | | | If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
* udevadm trigger: allow matching by device nameZbigniew Jędrzejewski-Szmek2014-11-251-17/+43
| | | | | | | | | | This makes udevadm trigger mirror udevadm info, except that multiple device names can be specified. Instructions in 60-keyboard.hwdb should now actually work. udevadm(8) is updated, but it could use a bit more polishing. https://bugs.freedesktop.org/show_bug.cgi?id=82311
* udevadm: split out find_device helperZbigniew Jędrzejewski-Szmek2014-11-251-12/+6
| | | | The idea is to unify the way that devices can be specified.
* udev: never bypass our own logging framework and call vsyslog() directly ↵Lennart Poettering2014-08-111-1/+0
| | | | from udev tools
* udev: place opening { at the same line as the function declarationKay Sievers2014-07-291-6/+3
|
* everywhere: always use O_CLOEXEC where it makes senseLennart Poettering2014-02-131-1/+1
|
* log: log_error() and friends add a newline after each line anyway, so avoid ↵Lennart Poettering2013-12-241-4/+4
| | | | including it in the log strings
* udevadm: modernizationZbigniew Jędrzejewski-Szmek2013-12-181-25/+16
|
* udevadm,scsi_id: add short options to help strings and to the man pageZbigniew Jędrzejewski-Szmek2013-12-181-42/+43
| | | | Also clean things up a bit here and there.
* udevadm-trigger: add parameters checkingYang Zhiyong2013-11-071-2/+15
|
* Remove some dead codeZbigniew Jędrzejewski-Szmek2013-03-311-1/+1
| | | | Based on coverity report.
* use streq instead of strcmpThomas Hindoe Paaboel Andersen2013-02-131-2/+2
|
* udev: move string copy functions to shared/Kay Sievers2013-01-091-4/+4
|
* use the same email address everywhereKay Sievers2012-11-121-1/+1
|
* udev: use startswith() and streq()Kay Sievers2012-04-161-1/+1
|
* udev: remove configuration options for /dev, /sys, /run directoriesKay Sievers2012-04-161-2/+2
|
* udev: fix gcc warnings showing up after adding $(AM_CFLAGS)Kay Sievers2012-04-101-1/+0
|
* udev: switch to systemd logging functionsKay Sievers2012-04-081-7/+4
|
* move imported udev into placeKay Sievers2012-04-041-0/+232