| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
$ perl -i -0pe 's|\s+{\n([^\n]*;)\n\s+}\n|\n\1\n|gms' **/*.c
Inspired by ea7cbf5bdd68d7861ebf1570c439e8bbabd83f6c.
|
|
|
|
|
|
| |
It's enough, complex stuff to warrant its own source file.
No other changes, just splitting out.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cleans up and unifies the outut of --help texts a bit:
1. Highlight the human friendly description string, not the command
line via ANSI sequences. Previously both this description string and
the brief command line summary was marked with the same ANSI
highlight sequence, but given we auto-page to less and less does not
honour multi-line highlights only the command line summary was
affectively highlighted. Rationale: for highlighting the description
instead of the command line: the command line summary is relatively
boring, and mostly the same for out tools, the description on the
other hand is pregnant, important and captions the whole thing and
hence deserves highlighting.
2. Always suffix "Options" with ":" in the help text
3. Rename "Flags" → "Options" in one case
4. Move commands to the top in a few cases
5. add coloring to many more help pages
6. Unify on COMMAND instead of {COMMAND} in the command line summary.
Some tools did it one way, others the other way. I am not sure what
precisely {} is supposed to mean, that uppercasing doesn't, hence
let's simplify and stick to the {}-less syntax
And minor other tweaks.
|
| |
|
| |
|
|
|
|
|
| |
This doesn't cover all the binaries, but I don't know how to script
this, and I run out of steam ;)
|
|
|
|
|
| |
It's a special case of strjoin(), so no need to keep both. In particular
as typing strjoin() is even shoert than strappend().
|
|
|
|
|
|
| |
Whenever I see EXTRACT_QUOTES, I'm always confused whether it means to
leave the quotes in or to take them out. Let's say "unquote", like we
say "cunescape".
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When emitting the calendarspec warning we want to see some color.
Follow-up for 04220fda5c.
Exceptions:
- systemctl, because it has a lot hand-crafted coloring
- tmpfiles, sysusers, stdio-bridge, etc, because they are also used in
services and I'm not sure if this wouldn't mess up something.
|
|
|
|
|
|
|
|
| |
This is partially a refactoring, but also makes many more places use
unlocked operations implicitly, i.e. all users of fopen_temporary().
AFAICT, the uses are always for short-lived files which are not shared
externally, and are just used within the same context. Locking is not
necessary.
|
|
|
|
|
| |
We have a function like this at two places already. Let's unify it in
one generic location and let's port a number of users over.
|
|
|
|
|
| |
At quite a few places we check isempty() || streq(…, "-"), let's add a
helper to simplify that, and replace that by a single function call.
|
| |
|
|
|
|
|
| |
This means we need to include many more headers in various files that simply
included util.h before, but it seems cleaner to do it this way.
|
| |
|
|
|
|
|
| |
This stuff is neither generic enough to be in def.h, nor really has much
to do with locale, hence give it its own .c/.h file pair.
|
|
|
|
| |
Just some source rearranging.
|
|
|
|
|
| |
This is mostly cosmetic. It makes those test binaries support SYSTEMD_LOG_*
environment variables.
|
|\
| |
| | |
missing: separate missing.h more
|
| | |
|
|/ |
|
|
|
|
|
|
| |
It's quite complex, let's split this out.
No code changes, just some file rearranging.
|
|
|
|
|
|
|
|
| |
This splits out a bunch of functions from fileio.c that have to do with
temporary files. Simply to make the header files a bit shorter, and to
group things more nicely.
No code changes, just some rearranging of source files.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Ideally, coccinelle would strip unnecessary braces too. But I do not see any
option in coccinelle for this, so instead, I edited the patch text using
search&replace to remove the braces. Unfortunately this is not fully automatic,
in particular it didn't deal well with if-else-if-else blocks and ifdefs, so
there is an increased likelikehood be some bugs in such spots.
I also removed part of the patch that coccinelle generated for udev, where we
returns -1 for failure. This should be fixed independently.
|
|
|
|
|
| |
This is high-level functionality, and fits better in shared/ (which is for
our executables), than in basic/ (which is also for libraries).
|
| |
|
| |
|
|
|
|
|
| |
Let's reduce the common boilerplate and have a single setup function
used by all service code to setup logging.
|
|\
| |
| | |
default to C.UTF-8 locale, and many improvements to env var file parsing/kernel cmdline parsing
|
| |
| |
| |
| | |
locale variable arrays
|
| |
| |
| |
| | |
Let's modernize things a bit.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Now that we don't (mis-)use the env file parser to parse kernel command
lines there's no need anymore to override the used newline character
set. Let's hence drop the argument and just "\n\r" always. This nicely
simplifies our code.
|
| |
| |
| |
| |
| |
| | |
/proc/cmdline
Let's always go through the proc-cmdline.c APIs.
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/| |
Add mode in journalctl where ^C is handled by the pager
|
| |
| |
| |
| |
| | |
Pretty much everything uses just the first argument, and this doesn't make this
common pattern more complicated, but makes it simpler to pass multiple options.
|
|/
|
|
| |
main() can't doesn't expect negative error codes as return.
|
|\
| |
| | |
FOREACH_LINE excorcism
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
This is a bit like the info link in most of GNU's --help texts, but we
don't do info but man pages, and we make them properly clickable on
terminal supporting that, because awesome.
I think it's generally advisable to link up our (brief) --help texts and
our (more comprehensive) man pages a bit, so this should be an easy and
straight-forward way to do it.
|
|
|
|
| |
Continuation of 4027f96aa08c73f109aa46b89842ca0e25c9c0e9.
|