summaryrefslogtreecommitdiff
path: root/src/udev/udevadm-info.c
Commit message (Collapse)AuthorAgeFilesLines
...
* udevadm: show only version number for '--version' optionYu Watanabe2018-09-211-1/+1
| | | | | | | | This effectively reverts 2bc54be485def3d1697a00209ff73ae21aa7f268 and relevant changes in #9920, as it is used to determine the version of udev, e.g., dracut. Fixes dracutdevs/dracut#468.
* udevadm-info: make info_main() returns negative value on errorYu Watanabe2018-09-101-44/+38
| | | | Also, this replaces fprintf(stderr, ...) by log_error().
* udevadm: use dispatch_verb() and drop udevadm_cmd structYu Watanabe2018-09-101-7/+2
|
* udev: drop unused udev structYu Watanabe2018-09-101-11/+11
|
* 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-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: make use of new STRLEN() macro everywhere (#7639)Lennart Poettering2017-12-141-4/+7
| | | | | Let's employ coccinelle to do this for us. Follow-up for #7625.
* udevadm: getopt() and help message cleanupYu Watanabe2017-12-051-1/+1
| | | | | | | | | 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.
* udevadm-info: list all short options in help textMarcus Folkesson2017-12-031-1/+1
| | | | Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
* Add SPDX license identifiers to source files under the GPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
|
* tree-wide: standardize on $(PACKAGE_VERSION) for the version stringZbigniew Jędrzejewski-Szmek2017-04-041-1/+1
| | | | | | We defined both $(VERSION) and $(PACKAGE_VERSION) with the same contents. $(PACKAGE_VERSION) is slightly more descriptive, so settle on that, and drop the other define.
* tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853)Reverend Homer2016-12-091-2/+2
|
* udevadm: trivial simplificationZbigniew Jędrzejewski-Szmek2016-06-141-8/+4
|
* Udevadm trivial cleanups (#3331)Zbigniew Jędrzejewski-Szmek2016-05-241-36/+26
| | | | | | | | * udevadm-info: use _cleanup_ * udevadm-info: propagate return value from export_devices() * sd-device: add comment and remove unnecessary braces
* 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 out fd-related operations into fd-util.[ch]Lennart Poettering2015-10-251-0/+1
| | | | | There are more than enough to deserve their own .c file, hence move them over.
* util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering2015-10-241-6/+7
| | | | | | | | | | | | | | 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: enclose invocation of unlinkat() with a (void) castLennart Poettering2015-04-211-8/+6
| | | | Let's make Coverity happy about this one.
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-231-3/+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.
* Assorted format fixesZbigniew Jędrzejewski-Szmek2015-01-221-3/+3
| | | | | Types used for pids and uids in various interfaces are unpredictable. Too bad.
* udevadm,..: make --help output of udev tools more like the output of the ↵Lennart Poettering2015-01-051-24/+28
| | | | various other tools
* udevadm: split out find_device helperZbigniew Jędrzejewski-Szmek2014-11-251-29/+1
| | | | The idea is to unify the way that devices can be specified.
* udev: place opening { at the same line as the function declarationKay Sievers2014-07-291-20/+10
|
* Remove dead lines in various placesZbigniew Jędrzejewski-Szmek2014-02-241-2/+1
| | | | | | As pointed-out by clang -Wunreachable-code. No behaviour changes.
* udevadm: modernizationZbigniew Jędrzejewski-Szmek2013-12-181-39/+27
|
* udevadm,scsi_id: add short options to help strings and to the man pageZbigniew Jędrzejewski-Szmek2013-12-181-33/+27
| | | | Also clean things up a bit here and there.
* udev: export tags of "dead" device nodes to /run/udev/static_node-tags/Tom Gundersen2013-07-161-0/+6
| | | | | | | | | | Based on a patch by Kay Sievers. A tag is exported at boot as a symlinks to the device node in the folder /run/udev/static_node-tags/<tagname>/, if the device node exists. These tags are cleaned up by udevadm info --cleanup-db, but are otherwise never removed.
* udevadm: place const in the right placeZbigniew Jędrzejewski-Szmek2013-03-221-1/+1
| | | | Otherwise clang at least thinks that both consts apply to char.
* udev: firmware - do not created /run/udev/firmware-missing/Kay Sievers2013-03-031-6/+0
| | | | | | The userspace firmware loader is deprecated now, and will be entirely removed when we depend on a kernel version with the built-in firmware loader available.
* use streq instead of strcmpThomas Hindoe Paaboel Andersen2013-02-131-6/+6
|
* udev: move string copy functions to shared/Kay Sievers2013-01-091-2/+2
|
* use the same email address everywhereKay Sievers2012-11-121-1/+1
|
* udev: support "udevadm info /dev/sda; udevadm info /sys/class/block/sda"Kay Sievers2012-06-101-78/+83
|
* udev: use startswith() and streq()Kay Sievers2012-04-161-2/+2
|
* udev: remove configuration options for /dev, /sys, /run directoriesKay Sievers2012-04-161-40/+22
|
* udev: replace ARRAY_SIZE() with ELEMENTSOF()Kay Sievers2012-04-161-1/+1
|
* 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-5/+1
|
* move imported udev into placeKay Sievers2012-04-041-0/+568