summaryrefslogtreecommitdiff
path: root/src/login/sysfs-show.c
Commit message (Collapse)AuthorAgeFilesLines
* basic: rename util.h to logarithm.hZbigniew Jędrzejewski-Szmek2022-11-081-1/+0
| | | | | util.h is now about logarithms only, so we can rename it. Many files included util.h for no apparent reason… Those includes are dropped.
* basic: split out glyph/emoji related calls from locale-util.[ch] into ↵Lennart Poettering2021-10-051-1/+1
| | | | | | | | glyph-util.[ch] These functions are used pretty much independently of locale, i.e. the only info relevant is whether th locale is UTF-8 or not. Hence let's give this its own pair of .c/.h files.
* tree-wide: use UINT64_MAX or friendsYu Watanabe2021-03-051-2/+2
|
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* logind: always check current tag list before using a deviceLennart Poettering2020-09-011-3/+3
|
* tree-wide: drop string.h when string-util.h or friends are includedYu Watanabe2019-11-041-1/+0
|
* tree-wide: get rid of strappend()Lennart Poettering2019-07-121-1/+1
| | | | | It's a special case of strjoin(), so no need to keep both. In particular as typing strjoin() is even shoert than strappend().
* locale-util: prefix special glyph enum values with SPECIAL_GLYPH_Lennart Poettering2018-12-141-4/+4
| | | | | | | This has been irritating me for quite a while: let's prefix these enum values with a common prefix, like we do for almost all other enums. No change in behaviour, just some renaming.
* tree-wide: drop unnecessary initializationsYu Watanabe2018-09-231-5/+5
|
* login/sysfs-show: use device_enumerator_get_devices()Yu Watanabe2018-09-101-19/+4
|
* login/sysfs-show: replace udev_device by sd_deviceYu Watanabe2018-08-231-72/+70
|
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-3/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* tree-wide: drop redundant _cleanup_ macros (#8810)Lennart Poettering2018-04-251-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-04-061-13/+0
| | | | | | | | | | 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.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* loginctl: rework sysfs tree dump, to honour --full and friendsLennart Poettering2017-11-101-8/+19
| | | | | | | | | Let's hook up the sysfs tree output with the output flags logic, already used when dumping log lines or process trees. This way we get very similar output handling for line breaking/ellipsation in all three outputs of structured data. Fixes: #7095
* tree-wide: rename draw_special_char to special_glyphZbigniew Jędrzejewski-Szmek2016-05-091-4/+4
| | | | | | | | | That function doesn't draw anything on it's own, just returns a string, which sometimes is more than one character. Also remove "DRAW_" prefix from character names, TREE_* and ARROW and BLACK_CIRCLE are unambigous on their own, don't draw anything, and are always used as an argument to special_glyph(). Rename "DASH" to "MDASH", as there's more than one type of dash.
* 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.
* tree-wide: group include of libudev.h with sd-*Thomas Hindoe Paaboel Andersen2015-11-171-1/+2
|
* tree-wide: sort includesThomas Hindoe Paaboel Andersen2015-11-161-2/+1
| | | | Sort the includes accoding to the new coding style.
* util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: move more locale-related calls to locale-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering2015-10-241-4/+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.
* tree-wide: use strempty() where possibleDaniel Mack2015-09-301-1/+1
| | | | Also add a Coccinell patch to detect such locations in the future.
* shared: add terminal-util.[ch]Ronny Chevalier2015-04-111-0/+1
|
* use new name DRAW_TREE_VERTICALThomas Hindoe Paaboel Andersen2014-04-231-2/+2
| | | | Was renamed in 6b01f1d3911bd7c7eadbb8a3b4375bd3ac05c98f
* loginctl: when showing device tree of seats with no devices show something ↵Lennart Poettering2013-12-181-0/+2
| | | | useful
* core,logind: libudev usage modernizationsLennart Poettering2013-12-181-25/+20
| | | | Always use cleanup logic and don't eat up errors returned by libudev
* core,logind,networkd: check for udev device initialization via enumeration ↵Lennart Poettering2013-12-181-0/+3
| | | | | | | matches Instead of checking each device after we got it, check wuth an enumeration filter instead, to make it more efficient.
* sysfs-show.c: return negative errorThomas Hindoe Paaboel Andersen2013-11-301-1/+1
| | | | introduced in 1ca208fb4f93e5869704af1812cbff7130a2fc03
* Introduce udev object cleanup functionsZbigniew Jędrzejewski-Szmek2013-10-131-15/+7
|
* logind: rename "seat-master" tag to "master-of-seat"Lennart Poettering2013-02-091-1/+1
| | | | | | | | | | | We currently enforce that seats are to be named in the form of "seatXXX", i.e. need to begin with the 4 characters "seat". Thus, "seat-master" would qualify as a seat name. As seat names are frequently used as tags on devices, the "seat-master" tag might hence confuse logind if the user decides to name a seat "seat-master". Hence, avoid any ambuigity: let's rename the "seat-master" tag to "master-of-seat".
* loginctl: don't show [UACCESS] info in device treeLennart Poettering2013-01-251-4/+3
| | | | | | | As the tree doesn't really necessarily show all device node devices and only those are marked for uaccess it's kinda pointless showing this at all, since it would give a pretty incomplete impression of the uaccess information.
* loginctl: show seat master and uaccess devices in seat-status outputLennart Poettering2013-01-241-2/+7
|
* util: nicer tree drawingsMichal Schmidt2012-11-121-5/+5
| | | | Draw trees more similar to pstree/findmnt/lsblk/...
* util : fallback to plain ASCII drawing if locale is not UTF-8Michal Schmidt2012-11-021-3/+5
| | | | | | | When printing cgroup and sysfs hierarchies, avoid using UTF-8 box drawing characters if the locale is not UTF-8. https://bugzilla.redhat.com/show_bug.cgi?id=871153
* util: split-out path-util.[ch]Kay Sievers2012-05-081-0/+1
|
* relicense to LGPLv2.1 (with exceptions)Lennart Poettering2012-04-121-4/+4
| | | | | | | | | | | | | | We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
* login: move seat udev rules to login subdirKay Sievers2012-01-221-0/+187