b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
75eb615480afd787fa412f0a529523f568f79b26 |
|
10-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
defs: rework CONF_DIRS_NULSTR() macro
The macro is generically useful for putting together search paths, hence
let's make it truly generic, by dropping the implicit ".d" appending it
does, and leave that to the caller. Also rename it from
CONF_DIRS_NULSTR() to CONF_PATHS_NULSTR(), since it's not strictly about
dirs that way, but any kind of file system path.
Also, mark CONF_DIR_SPLIT_USR() as internal macro by renaming it to
_CONF_PATHS_SPLIT_USR() so that the leading underscore indicates that
it's internal. |
a0f29c767a3bb3d621c658fa5b87063e1f44e24a |
|
03-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move CONF_DIRS_NULSTR definition to def.h
After all, this is not some compiler or C magic, but something very
specific to how systemd works, hence let's move it into def.h, and out
of macro.h |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
7d50b32a129e781401cf897475f388f682de1368 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out globbing related calls into glob-util.[ch] |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
07630cea1f3a845c09309f197ac7c4f11edd3b62 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split our string related calls from util.[ch] into its own file 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. |
3f6fd1ba65f962702753c4ad284b588e59689a23 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
util: introduce common version() implementation and use it everywhere
This also allows us to drop build.h from a ton of files, hence do so.
Since we touched the #includes of those files, let's order them properly
according to CODING_STYLE. |
57255510c95ca3369d241502f26d7bbd8fac30a6 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: replace while(1) by for(;;) everywhere
Another Coccinelle script. |
dacd6cee76a08331b8c8616c5f30f70ee49aa2f9 |
|
29-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: port everything over to fflush_and_check()
Some places invoked fflush() directly with their own manual error
checking, let's unify all that by using fflush_and_check().
This also unifies the general error paths of fflush()+rename() file
writers. |
72c0a2c255b172ebbb2a2b7dab7c9aec4c9582d9 |
|
15-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
everywhere: port everything to sigprocmask_many() and friends
This ports a lot of manual code over to sigprocmask_many() and friends.
Also, we now consistly check for sigprocmask() failures with
assert_se(), since the call cannot realistically fail unless there's a
programming error.
Also encloses a few sd_event_add_signal() calls with (void) when we
ignore the return values for it knowingly. |
24882e06c135584f16f31ba8a00fecde8b7f6fad |
|
29-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split out signal-util.[ch] from util.[ch]
No functional changes. |
6482f6269c87d2249e52e889a63adbdd50f2d691 |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add formats-util.h |
1fa2f38f0f011010bf57522b42fcc168856a7003 |
|
22-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Assorted format fixes
Types used for pids and uids in various interfaces are unpredictable.
Too bad. |
5dabb1e04e4521abf040e77a8322b70e7acdc7b0 |
|
06-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: enable curl debug output conditionally
https://bugs.freedesktop.org/show_bug.cgi?id=86464 |
2cf4172a71860c6e44edd27a3b68047ae062d7fc |
|
05-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: install sigbus handler for journal tools too
This makes them robust regarding truncation. Ideally, we'd export this
as an API, but given how messy SIGBUS handling is, and the uncertain
ownership logic of signal handlers we should not do this (unless libc
one day invents a scheme how to sanely install SIGBUS handlers for
specific memory areas only). However, for now we can still make all our
own tools robust.
Note that external tools will only have read-access to the journal
anyway, where SIGBUS is much more unlikely, given that only writes are
subject to disk full problems. |
bf257aed057efd113f1b84e037fde09ffeed32ee |
|
29-Nov-2014 |
Josh Triplett <josh@joshtriplett.org> |
journald-remote,journal-upload: Support .d directories in the usual search paths |
4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: another round of simplifications
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno
+ return simplifications". |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
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. |
eb56eb9b40950f1edcffdb7313f8de4f8572a6d5 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: simplify log_*_errno(r,...) immediately followed by "return r" |
c33b329709ebe2755181980a050d02ec7c81ed87 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: more log_*_errno() conversions, multiline calls
Basically:
find . -name '*.[ch]' | while read f; do perl -i.mmm -e \
'local $/;
local $_=<>;
s/log_(debug|info|notice|warning|error|emergency)\("([^"]*)%s"([^;]*),\s*strerror\(-?([->a-zA-Z_]+)\)\);/log_\1_errno(\4, "\2%m"\3);/gms;print;' \
$f; done
Plus manual indentation fixups. |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
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(). |
36d4739a68c3edafe4d145d525a26de4ef0b8e5a |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: return proper exit code
Even when termninated normally, systemd-journal-upload would return
something positive which would be interpreted as failure. |
8847551bcbfa8265bae04f567bb1aadc7b480325 |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: fix --trust=all option |
30776485c5bc2d9c356e875f2aee874d22c393b7 |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: avoid calling printf with maximum precision
Precision of INT_MAX does not work as I expected it to.
https://bugzilla.redhat.com/show_bug.cgi?id=1154334 |
d71839afd88589247d8dd42b2b09d024f521749d |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: verify state file can be saved before uploading
Do our best verify that we can actually write the state file
before upload commences to avoid duplicate messages on the server. |
50a0b0717563d08c027a16a896bff8d7754eab9e |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: do not require port to be set |
1af719edc5958c01c19204fb68d6fc45c9eea85c |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemd-upload: print paths in help() |
42b6bf75e414c4e6ff5b92cda1c76b6b73677cb7 |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: fix socket activation |
b88a40a7e592e0a4a2e6e8eb1ed3721989ba5d0e |
|
18-Sep-2014 |
Philippe De Swert <philippedeswert@gmail.com> |
journal-upload: Remove compilation warning
When compiling we see this curl warning popping up:
src/journal-remote/journal-upload.c:194:17: warning: call to
‘_curl_easy_setopt_err_error_buffer’ declared with attribute
warning: curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE
as argument for this option [enabled by default]
This patch removes the warning (which occurs twice). |
af4ec4309e8f82aad87a8d574785c12f8763d5f8 |
|
21-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
notify: send STOPPING=1 from our daemons |
e1ad6e245dcf63faa8f183063eb97678f4f9ac94 |
|
20-Aug-2014 |
Lukas Nykryn <lnykryn@redhat.com> |
journal-upload: make sure that 'r' is initialized |
4015ac5c321f34784f73bd91ae9d7855ed663e5e |
|
20-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
journal-upload: allow the tool to start |
dad29dff1925a114e20d4eb7b47fca23c4f25fd7 |
|
20-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
cmdline: for new tools avoid introduce new negative switches, and properly align --help texts
Negative switches are a bad un-normalized thing. We alerady have some,
but we should try harder to avoid intrdoucing new ones.
Hence, instead of adding two switches:
--foobar
--no-foobar
Let's instead use the syntax
--foobar
--foobar=yes
--foobar=no
Where the first two are equivalent. The boolean argument is parsed
following the usual rules.
Change all new negative switches this way.
This patch also properly aligns the --help table, so that single char
switches always get a column separate of the long switches. |
799a8f39d8eb9ea725e85a598c0f5dbd658c8ba7 |
|
03-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: rename KEY_FILE to avoid confict with <linux/input.h> |
36f822c4bd077f9121757e24b6516e5c7ada63b5 |
|
17-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Let config_parse open file where applicable
Special care is needed so that we get an error message if the
file failed to parse, but not when it is missing. To avoid duplicating
the same error check in every caller, add an additional 'warn' boolean
to tell config_parse whether a message should be issued.
This makes things both shorter and more robust wrt. to error reporting. |
29fc0ddcd737af906986d4029579d4dfe838ba02 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: add config file |
5bc891206dd8eb4e4df58f502b0184b8426caf22 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: let user specify just the main part of the url
We can append /upload ourselves. |
a83f403760cb63b1bf7787e9ff325ffb6d891d39 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: improve some messages |
8201af08fa09c2bd0f005fbe262f27e2c5bd2d86 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: allow splitting incoming logs by source host
Previously existing scheme where the file name would be based on
the source was just too ugly and unpredicatable. Now there are
only two options:
1. just one file (until rotation),
2. one file per source host, using the hostname as filename part.
For the cases where the source is specified by the user, only
option one is allowed, and the full of the file must be specified. |
a3152e7655231b94fa7b9582906fb86ab00b9c99 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: add watchdog support |
722b6795655149a68277b3cffeba711e1d440e5a |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: make state persistent |
eacbb4d33e2bb5c54311544851140efe3dd0f774 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: use journal as the source |
7449bc1f34c206e3ff8e274cd74e2db950d492a1 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: HTTPS support |
3d090cc6f34e5970765dd1e7ee5e648a056d180d |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: a tool to push messages to systemd-journal-remote |