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. |
8a03c9ef744e13dc700a7e7ca6cae8afdcf0d71c |
|
24-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journald: allow additional payload in server_driver_message
The code to format the iovec is shared with log.c. All call sites to
server_driver_message are changed to include the additional "MESSAGE="
part, but the new functionality is not used and change in functionality
is not expected.
iovec is preallocated, so the maximum number of messages is limited.
In server_driver_message N_IOVEC_PAYLOAD_FIELDS is currently set to 1.
New code is not oom safe, it will fail if memory cannot be allocated.
This will be fixed in subsequent commit. |
b4bbcaa9c44260e88402cb8f9a5fb8ac7f35e123 |
|
17-Nov-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
tree-wide: group include of libudev.h with sd-* |
cf0fbc49e67b55f8d346fc94de28c90113505297 |
|
16-Nov-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
tree-wide: sort includes
Sort the includes accoding to the new coding style. |
e1427b138fbf7b7f13bb61187635b882be3ca2b2 |
|
09-Nov-2015 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: apply errno.cocci
with small manual cleanups for style. |
7bb87460e691d30c1a7fd23a1a8240776957e05f |
|
05-Nov-2015 |
Michal Schmidt <mschmidt@redhat.com> |
journal: posix_fallocate() does not set errno
manpage says:
posix_fallocate() returns zero on success, or an error number on
failure. Note that errno is not set. |
15a5e95075a7f6007dd97b2a165c8ed16fe683df |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out printf() helpers to stdio-util.h |
afc5dbf37fd2399d37976388d9dd9ab470ecf446 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
io-util.h: move iovec stuff from macro.h to io-util.h |
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. |
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split out escaping code into escape.[ch]
This really deserves its own file, given how much code this is now. |
dc61b7e45d89a69f0469ab7b3289cdde7fcc55ab |
|
08-Sep-2015 |
Torstein Husebø <torstein@huseboe.net> |
treewide: fix typos |
0b452006de98294d1690f045f6ea2f7f6630ec3b |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add process-util.[ch] |
6482f6269c87d2249e52e889a63adbdd50f2d691 |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add formats-util.h |
527b7a421ff3927d4f3f170b1b143452e88ae1dc |
|
07-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
util: rework cunescape(), improve error handling
Change cunescape() to return a normal error code, so that we can
distuingish OOM errors from parse errors.
This also adds a flags parameter to control whether "relaxed" or normal
parsing shall be done. If set no parse failures are generated, and the
only reason why cunescape() can fail is OOM. |
3b97fcbd28f92a1e51887fef5de8844a89bde523 |
|
03-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
journald: fix some xsprrintf() buffer size fallout |
5ffa8c818120e35c89becd938d160235c069dd12 |
|
01-Feb-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add a snprinf wrapper which checks that the buffer was big enough
If we scale our buffer to be wide enough for the format string, we
should expect that the calculation was correct.
char_array_0() invocations are removed, since snprintf nul-terminates
the output in any case.
A similar wrapper is used for strftime calls, but only in timedatectl.c. |
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. |
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(). |
3b3154df7e2773332bb814e167187367a0ccae4a |
|
03-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
journald: constify all things! |
b9c488f60050248b35640f28e4d00958702ba1c3 |
|
13-Aug-2014 |
Eelco Dolstra <eelco.dolstra@logicblox.com> |
journald: Fix off-by-one error in "Missed X kernel messages" warning
On receiving a message, "kernel_seqnum" is set to "serial + 1". So
subtracting 1 will cause messages like "Missed 0 kernel messages",
which should be "Missed 1 kernel messages". |
73f860db9893deab6aebceb53dd7d0deb662e832 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Always prefer our headers to system headers
In practice this shouldn't make much difference, but
sometimes our headers might be newer, and we want to
test them. |
36dd072cdf03dcac0fcd2d6b42f261444dc7ac88 |
|
28-Jul-2014 |
Michal Sekletar <msekleta@redhat.com> |
journald: always add syslog facility for messages coming from kmsg
Set SYSLOG_FACILITY field for kernel log messages too. Setting only
SYSLOG_IDENTIFIER="kernel" is not sufficient and tools reading journal
maybe confused by missing SYSLOG_FACILITY field for kernel log messages. |
de0671ee7fe465e108f62dcbbbe9366f81dd9e9a |
|
15-May-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Remove unnecessary casts in printfs
No functional change expected :) |
03e334a1c7dc8c20c38902aa039440763acc9b17 |
|
18-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
util: replace close_nointr_nofail() by a more useful safe_close()
safe_close() automatically becomes a NOP when a negative fd is passed,
and returns -1 unconditionally. This makes it easy to write lines like
this:
fd = safe_close(fd);
Which will close an fd if it is open, and reset the fd variable
correctly.
By making use of this new scheme we can drop a > 200 lines of code that
was required to test for non-negative fds or to reset the closed fd
variable afterwards. |
151b9b9662a90455262ce575a8a8ae74bf4ff336 |
|
20-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
api: in constructor function calls, always put the returned object pointer first (or second)
Previously the returned object of constructor functions where sometimes
returned as last, sometimes as first and sometimes as second parameter.
Let's clean this up a bit. Here are the new rules:
1. The object the new object is derived from is put first, if there is any
2. The object we are creating will be returned in the next arguments
3. This is followed by any additional arguments
Rationale:
For functions that operate on an object we always put that object first.
Constructors should probably not be too different in this regard. Also,
if the additional parameters might want to use varargs which suggests to
put them last.
Note that this new scheme only applies to constructor functions, not to
all other functions. We do give a lot of freedom for those.
Note that this commit only changes the order of the new functions we
added, for old ones we accept the wrong order and leave it like that. |
a69f4254a82765cd0c7f155d5dc86e0768ea0ef3 |
|
17-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
journald: before closing /dev/kmsg let's unregister the event source |
c0f71f469fef3f3a0822e0021085e6d165df2b46 |
|
17-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
journald: close /dev/kmsg again if we cannot make use of it |
445ea9be520b9549aee45d0b6427cf48b446987f |
|
17-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
journald: downgrade warning message when /dev/kmsg does not exist |
f9a810bedacf1da7c505c1786a2416d592665926 |
|
11-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
journald: port to sd-event and enable watchdog support |
f5f6d0e25574dd63fb605b81fa7767dd71c454db |
|
26-Nov-2013 |
Daniel Buch <boogiewasthere@gmail.com> |
tree-wide usage of %m specifier instead of strerror(errno)
Also for log_error() except where a specific error is specified
e.g. errno ? strerror(errno) : "Some user specified message" |
968f319679d9069af037240d0c3bcd126181cdac |
|
21-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal: allow callers to specify OBJECT_PID=
When journald encounters a message with OBJECT_PID= set
coming from a priviledged process (UID==0), additional fields
will be added to the message:
OBJECT_UID=,
OBJECT_GID=,
OBJECT_COMM=,
OBJECT_EXE=,
OBJECT_CMDLINE=,
OBJECT_AUDIT_SESSION=,
OBJECT_AUDIT_LOGINUID=,
OBJECT_SYSTEMD_CGROUP=,
OBJECT_SYSTEMD_SESSION=,
OBJECT_SYSTEMD_OWNER_UID=,
OBJECT_SYSTEMD_UNIT= or OBJECT_SYSTEMD_USER_UNIT=.
This is for other logging daemons, like setroubleshoot, to be able to
augment their logs with data about the process.
https://bugzilla.redhat.com/show_bug.cgi?id=951627 |
507f22bd0172bff5e5d98145b1419bd472a2c57f |
|
10-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use stdint.h macros instead of casts to print uint64_t values
Casts are visually heavy, and can obscure unwanted truncations. |
4b94f3b8f7693f076e5c85bc2c02cf028192d8de |
|
31-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journald: check return value of strappend |
d025f1e4dca8fc1436aff76f9e6185fe3e728daa |
|
14-Nov-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
build-sys: store journald code in a noinst library
The point is to allow the use of journald functions by other binaries.
Before, journald code was split into multiple files (journald-*.[ch]),
but all those files all required functions from journald.c. And
journald.c has its own main(). Now, it is possible to link against
those functions, e.g. from test binaries.
This constitutes a fix for https://bugzilla.redhat.com/show_bug.cgi?id=872638.
The patch does the following:
1. rename journald.h to journald-server.h and move corresponding code
to journald-server.c.
2. add journald-server.c and other journald-*.c parts to
libsystemd-journal-internal.
3. remove journald-syslog.c from test_journal_syslog_SOURCES, since
it is now contained in libsystemd-journal-internal.
There are no code changes, apart from the removal of a few static's,
to allow function calls between files. |
e9f600f2fb4b0df55c7a8fb4b4d09f9979997223 |
|
26-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: fix parsing of monotonic kernel timestamps |
e88baee88fad8bc59d33b55a7a2d640ef9e16cd6 |
|
13-Oct-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journald: properly update message size after stripping the identifier
Valgrind says:
==29176== Conditional jump or move depends on uninitialised value(s)
==29176== at 0x412A85: cunescape_length_with_prefix (util.c:1565)
==29176== by 0x40B351: dev_kmsg_record (journald-kmsg.c:301)
==29176== by 0x40B653: server_read_dev_kmsg (journald-kmsg.c:347)
==29176== by 0x40B701: server_flush_dev_kmsg (journald-kmsg.c:365)
==29176== by 0x409DE7: main (journald.c:1535) |
b2e6df73aa508cc09b1b536a2fb9f90f152b89fa |
|
02-Oct-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
trivial: fix typo |
2b43f939a4b3ad5aeb2650868b0234ff42ec0045 |
|
06-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: avoid logging to kmsg in the normal paths |
4871690d9e32608bbd9b18505b5326c2079c9690 |
|
24-Aug-2012 |
Allin Cottrell <cottrell@wfu.edu> |
journald: add missing includes |
5809560d858f45351856d6fe786a8117306dd0f2 |
|
22-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: move syslog specific calls out of util.c |
35e2e347d38cc2f8bd7c38a0d8a5129f5fbb0ab9 |
|
22-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: splitt of syslog protocol support into its own file |
ef63833d532dd86bdba63211e6a1363cbb3ef61d |
|
22-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
journald: split /dev/kmsg related stuff into its own .c file |