summaryrefslogtreecommitdiff
path: root/src/delta
AgeCommit message (Collapse)Author
2015-09-22cgtop: underline table headerLennart Poettering
Let's underline the header line of the table shown by cgtop, how it is customary for tables. In order to do this, let's introduce new ANSI underline macros, and clean up the existing ones as side effect.
2015-06-10tree-wide: whenever we fork off a foreign child process reset signal ↵Lennart Poettering
mask/handlers Also, when the child is potentially long-running make sure to set a death signal. Also, ignore the result of the reset operations explicitly by casting them to (void).
2015-04-11shared: add terminal-util.[ch]Ronny Chevalier
2015-04-10shared: add process-util.[ch]Ronny Chevalier
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
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.
2014-12-14delta: fix output alignment of [REDIRECTED] entriesIvan Shapovalov
2014-11-30delta: Fix broken separator supportAlison Chaiken
systemd-delta man page promises that multiple types of deltas will be concatenated if they are listed with a comma as separator. Replace FOREACH_WORD() with FOREACH_WORD_SEPARATOR() to restore the functionality.
2014-11-29delta: diff returns 1 when files differ, ignore thisZbigniew Jędrzejewski-Szmek
https://bugs.debian/org/771397
2014-11-28treewide: another round of simplificationsMichal Schmidt
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno + return simplifications".
2014-11-28treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt
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.
2014-11-28treewide: more log_*_errno + return simplificationsMichal Schmidt
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt
It corrrectly handles both positive and negative errno values.
2014-11-28treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt
As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
2014-10-24delta: use wait_for_terminate_and_warn() to generate warnin when diff failsLennart Poettering
2014-09-25delta: warn if diff failedTom Gundersen
Found by Coverity. Fixes CID #1237541.
2014-09-15hashmap: introduce hash_ops to make struct Hashmap smallerMichal Schmidt
It is redundant to store 'hash' and 'compare' function pointers in struct Hashmap separately. The functions always comprise a pair. Store a single pointer to struct hash_ops instead. systemd keeps hundreds of hashmaps, so this saves a little bit of memory.
2014-08-03Unify parse_argv styleZbigniew Jędrzejewski-Szmek
getopt is usually good at printing out a nice error message when commandline options are invalid. It distinguishes between an unknown option and a known option with a missing arg. It is better to let it do its job and not use opterr=0 unless we actually want to suppress messages. So remove opterr=0 in the few places where it wasn't really useful. When an error in options is encountered, we should not print a lengthy help() and overwhelm the user, when we know precisely what is wrong with the commandline. In addition, since help() prints to stdout, it should not be used except when requested with -h or --help. Also, simplify things here and there.
2014-07-31Reject invalid quoted stringsZbigniew Jędrzejewski-Szmek
String which ended in an unfinished quote were accepted, potentially with bad memory accesses. Reject anything which ends in a unfished quote, or contains non-whitespace characters right after the closing quote. _FOREACH_WORD now returns the invalid character in *state. But this return value is not checked anywhere yet. Also, make 'word' and 'state' variables const pointers, and rename 'w' to 'word' in various places. Things are easier to read if the same name is used consistently. mbiebl_> am I correct that something like this doesn't work mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"' mbiebl_> systemd seems to strip of the quotes mbiebl_> systemctl status shows mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS $RootDir $MountPoint mbiebl_> which is pretty weird
2014-04-23delta: draw arrows with draw_special_char()Lennart Poettering
Let's unify generation of unicode chars at one place. Also, don't add an extra space into chars we print, except for the tree chars where this is really necessary.
2014-04-16delta: do not use unicode chars in C localeZbigniew Jędrzejewski-Szmek
https://bugzilla.redhat.com/show_bug.cgi?id=1088418
2014-01-09delta: ensure that d_type will be set on every fsLukas Nykryn
2013-12-22delta: if prefix is specified, only show overrides thereZbigniew Jędrzejewski-Szmek
systemd-delta /run/systemd/system will show all unit overrides in /run, etc.
2013-12-22delta: fix delta for drop-insZbigniew Jędrzejewski-Szmek
Also, fix highlighting, add more debug statements, make const tables static and global, run path_kill_slashes only at entry.
2013-12-21delta: replace readdir_r with readdirFlorian Weimer
2013-12-06Get rid of our reimplementation of basenameZbigniew Jędrzejewski-Szmek
The only problem is that libgen.h #defines basename to point to it's own broken implementation instead of the GNU one. This can be fixed by #undefining basename.
2013-11-06clients: unify how we invoke getopt_long()Lennart Poettering
Among other things this makes sure we always expose a --version command and show it in the help texts.
2013-08-04systemd-delta: Only print colors when on a ttyDaniel Schaal
This make systemd-delta follow the behaviour of systemctl and journalctl. https://bugs.freedesktop.org/show_bug.cgi?id=67656 [zj: unify color query methods between those three programs.]
2013-05-16systemd-delta: count overrides only of the requested typeZbigniew Jędrzejewski-Szmek
2013-05-16systemd-delta: add support for drop-in snippetsLukas Nykryn
2013-03-07pager: introduce "jump to end" optionHarald Hoyer
$ journalctl -be is what you want :) https://bugzilla.redhat.com/show_bug.cgi?id=867841
2013-02-13use strneq instead of strncmpThomas Hindoe Paaboel Andersen
2013-01-04build-sys: drop all distribution specfic checksLennart Poettering
Yay, we now have a completely generic systemd. No distribution specific checks anymore!
2012-11-14delta.c: fix option '-t'Thomas Hindoe Paaboel Andersen
Both the help and man page claims that it accepts -t with an argument so let's do that.
2012-11-13delta.c: use _cleanup_Thomas Hindoe Paaboel Andersen
2012-11-12remove duplicate semicolonsThomas Hindoe Paaboel Andersen
2012-09-19util: define union dirent_storage and make use of it everywhereLennart Poettering
Make sure to allocate enough space for readdir_r(). https://bugzilla.redhat.com/show_bug.cgi?id=858754
2012-07-13util: rename join() to strjoin()Lennart Poettering
This is to match strappend() and the other string related functions.
2012-06-27core: rename system.preset to system-presets to follow naming scheme of ↵Lennart Poettering
other dirs in /usr/lib/systemd/ Thankfully nobody is using this yet, and presets aren't documented yet, hence take the liberty to rename this.
2012-05-21delta/delta.c: initialize bottom for fail stateHarald Hoyer
2012-05-21delta: fix spelling of overriddenNis Martensen
2012-05-21delta: drop PHP'ismLennart Poettering
2012-05-21delta: don't highlight unchanged filesLennart Poettering
2012-05-21delta: introduce arg_flags field, to follow our usual schemeLennart Poettering
2012-05-16delta: use same nomenclature for equivalent and redirected everywhereLennart Poettering
2012-05-16delta: enums are much cooler than definesLennart Poettering
2012-05-16delta: Support filtering what type of deltas to showGergely Nagy
Not everyone is interested in every kind of deltas (and some might even be interested knowing which files do not have overrides), so this here is an implementation of a --type=LIST... option for systemd-delta, that makes it possible to filter what subset of deltas we want. The available modifiers are masked, equivalent, redirected, overriden, and unchanged - they should be self explanatory, and the man page explains them in a little more detail anyway. As a side effect, in case of overriden files, the diff output was made optional. By default, everything is shown (with a diff, if appropriate) except for completely unchanged files. Signed-off-by: Gergely Nagy <algernon@balabit.hu>
2012-05-16delta: add preset dirsLennart Poettering
2012-05-16delta: add missing filesLennart Poettering