summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-12-18systemd-hwdb: introduce new toolTom Gundersen
This pulls out the hwdb managment from udevadm into an independent tool. The old code is left in place for backwards compatibility, and easy of testing, but all documentation is dropped to encourage use of the new tool instead.
2014-12-18networkd: add FDB supportAlin Rauta
2014-12-18journal: next_with_matches() now does not need a mapped object as inputMichal Schmidt
Now that journal_file_next_entry() does not need a pointer to the current object, next_with_matches() does not need it either.
2014-12-18journal: journal_file_next_entry() does not need pointer to current ObjectMichal Schmidt
The current offset is sufficient information.
2014-12-18journal: optimize iteration by returning previously found candidate entryMichal Schmidt
In next_beyond_location() when the JournalFile's location type is LOCATION_SEEK, it means there's nothing to do, because we already have the location of the candidate entry. Do an early return. Note that now next_beyond_location() does not anymore guarantee on return that the entry is mapped, but previous patches made sure the caller does not care. This optimization is at least as good as "journal: optimize iteration: skip files that cannot improve current candidate entry" was. Timing results on my workstation, using: $ time ./journalctl -q --since=2014-06-01 --until=2014-07-01 > /dev/null Before "Revert "journal: optimize iteration: skip files that cannot improve current candidate entry": real 0m5.349s user 0m5.166s sys 0m0.181s Now: real 0m3.901s user 0m3.724s sys 0m0.176s
2014-12-18journal: optimize iteration by skipping exhausted filesMichal Schmidt
If from a previous iteration we know we are at the end of a journal file, don't bother looking into the file again. This is complicated by the fact that the EOF does not have to be permanent (think of "journalctl -f"). So we also check if the number of entries in the journal file changed. This optimization has a similar effect as "journal: optimize iteration: skip whole files behind current location" had.
2014-12-18journal: drop unnecessary parameters of next_beyond_location()Michal Schmidt
offset is redundant, because the caller can rely on f->current_offset. The object pointer the function saves in *ret is thrown away by the caller.
2014-12-18journal: remove redundant variable new_offsetMichal Schmidt
The file's current_offset is already updated at this point, so let's use it.
2014-12-18journal: compare candidate entries using JournalFiles' locationsMichal Schmidt
When comparing the locations of candidate entries, we can rely on the location information stored in struct JournalFile.
2014-12-18journal: simplify set_location()Michal Schmidt
set_location() is called from real_journal_next() when a winning entry has been picked from among the candidates in journal files. The location type is always set to LOCATION_DISCRETE. No need to pass it as a parameter. The per-JournalFile location information is already updated at this point. No need for having the direction and offset here.
2014-12-18journal: keep per-JournalFile location info during iterationMichal Schmidt
In next_beyond_location() when we find a candidate entry in a journal file, save its location information in struct JournalFile. The purpose of remembering the locations of candidate entries is to be able to save work in the next iteration. This patch does only the remembering part. LOCATION_SEEK means the location identifies a candidate entry. When a winner is picked from among candidates, it becomes LOCATION_DISCRETE. LOCATION_TAIL here signifies we've iterated the file to the end (or the beginning in the case of reversed direction).
2014-12-18journal: abstract the resetting of JournalFile's locationMichal Schmidt
2014-12-18journal: move definition of LocationType to journal-file.hMichal Schmidt
In preparation for individual JournalFiles maintaining a location of their own.
2014-12-18Revert "journal: optimize iteration: skip whole files behind current location"Michal Schmidt
This reverts commit b7c88ab8cc7d55a43450bf3dea750f95f2e910d6. This optimization will be made redundant by the following patches.
2014-12-18Revert "journal: optimize iteration: skip files that cannot improve current ↵Michal Schmidt
candidate entry" This reverts commit f8b5a3b75fb55f0acb85c21424b3893c822742e9. This optimization will be made redundant by the following patches.
2014-12-18journal: delete unused function journal_file_skip_entry()Michal Schmidt
Its only caller is a test.
2014-12-18journal: delete unused function journal_file_move_to_entry_by_offset()Michal Schmidt
2014-12-18core: use raw_clone instead of fork in signal handlerZbigniew Jędrzejewski-Szmek
fork() is not async-signal-safe and calling it from the signal handler could result in a deadlock when at_fork() handlers are called. Using the raw clone() syscall sidesteps that problem. The tricky part is that raise() does not work, since getpid() does not work. Add raw_getpid() to get the real pid, and use kill() instead of raise(). https://bugs.freedesktop.org/show_bug.cgi?id=86604
2014-12-18test-unit-file: add test for semicolon escapingZbigniew Jędrzejewski-Szmek
https://bugs.freedesktop.org/show_bug.cgi?id=87393
2014-12-17load-fragment: properly unescape \;tomsod-m ya ru
https://bugs.freedesktop.org/show_bug.cgi?id=87393
2014-12-17path: make the check for unsupported name_to_handle_at symmetricZbigniew Jędrzejewski-Szmek
If child supports, but the parent does not, or when the child does not support, but the parent does, assume the child is a mount point. Only if neither supports use the fallback.
2014-12-17path: follow symbolic link for parent path (2)Umut Tezduyar Lindskog
c0e57ba9e22ee937722958d8b912ade2a37f206d fixed the fallback path. We should do the same for name_to_handle_at().
2014-12-18machinectl: add new commands for copying files from/to containersLennart Poettering
2014-12-18util: in make_stdio() use dup2() rather than dup3()Lennart Poettering
dup3() allows setting O_CLOEXEC which we are not interested in. However, it also fails if called with the same fd as input and output, which is something we don't want. Hence use dup2(). Also, we need to explicitly turn off O_CLOEXEC for the fds, in case the input fd was O_CLOEXEC and < 3.
2014-12-18machinectl: implement "bind" command to create additional bind mounts from ↵Lennart Poettering
host to container during runtime
2014-12-17nspawn: fix invocation of the raw clone() system call on s390 and crisKen Werner
Since the order of the first and second arguments of the raw clone() system call is reversed on s390 and cris it needs to be invoked differently.
2014-12-16path: follow symbolic link for parent pathUmut Tezduyar Lindskog
[zj: When we lstat the target path, symlinks above the last component will be followed by both stat and lstat. So when we look at the parent, we should follow symlinks.]
2014-12-17shared: strv - add strv_clear()Tom Gundersen
This frees the elements of the strv without freeing the strv itself.
2014-12-16shared: path-util - memory leakTom Gundersen
2014-12-16udev: net_setup - fix warningTom Gundersen
2014-12-16test-json: use fabsThomas Hindoe Paaboel Andersen
2014-12-16fix compiler warningSusant Sahani
src/shared/utf8.c:268:13: warning: unused variable 'd' [-Wunused-variable] int d;
2014-12-16systemctl: fix argument handling when invoked as "shutdown"Jan Synacek
2014-12-16nss-myhostname: also recognize "gateway."Harald Hoyer
"gateway." skips adding the domain search path and saves some queries to the nameserver.
2014-12-16systemctl: refuse to edit runtime dropins when they already exist in /etcZbigniew Jędrzejewski-Szmek
The check for existing unit files and dropins is unified. path_join() is updated to not insert duplicate separators.
2014-12-16systemctl: share path lookup between 'cat' and 'edit'Zbigniew Jędrzejewski-Szmek
'systemctl cat' now works for templates too. 'systemctl edit' does not refuse to edit units that have changed on disk. That restriction didn't seem useful, actually editing units that have changed on disk before they are started is very reasonable. 'edit' with instances and templates works again: Now: $ build/systemctl edit getty@ Failed to copy /etc/systemd/system/getty@.service.d/override.conf to /etc/systemd/system/getty@.service.d/.override.confdff6290408c86369: Permission denied $ build/systemctl edit getty@tty3 Failed to create directories for /etc/systemd/system/getty@tty3.service.d/override.conf: Permission denied $ build/systemctl edit --full getty@tty3 Failed to copy /usr/lib/systemd/system/getty@.service to /etc/systemd/system/.getty@tty3.serviced3d175087e7e439b: Permission denied Failed to create temporary file for /etc/systemd/system/getty@tty3.service: Permission denied $ build/systemctl edit --full getty@ Failed to copy /usr/lib/systemd/system/getty@.service to /etc/systemd/system/.getty@.servicea3caad491c0f2f3d: Permission denied Failed to create temporary file for /etc/systemd/system/getty@.service: Permission denied
2014-12-16systemctl: split out LookupPaths initializationZbigniew Jędrzejewski-Szmek
2014-12-16systemctl: move two functions upZbigniew Jędrzejewski-Szmek
No functional change.
2014-12-16systemctl: unify warning about unit files changed on diskZbigniew Jędrzejewski-Szmek
2014-12-16systemctl: do not use -1 for return codeZbigniew Jędrzejewski-Szmek
Also make the error messages more specific to give a hint to the user how to solve the problem.
2014-12-16Move dropin listing to sharedZbigniew Jędrzejewski-Szmek
No functional change. This is in preparation for using this in systemctl in the future.
2014-12-15shared: add minimal JSON tokenizerLennart Poettering
2014-12-15udev: builtin-hwdb - port to sd-hwdbTom Gundersen
2014-12-15udevadm: port to sd-hwdbTom Gundersen
2014-12-15networkctl: port from libudev to sd-hwdbTom Gundersen
2014-12-15unit: handle nicely of certain unit types are not supported on specific systemsLennart Poettering
Containers do not really support .device, .automount or .swap units; Systems compiled without support for swap do not support .swap units; Systems without kdbus do not support .busname units. With this change attempts to start a unsupported unit types will result in an immediate "unsupported" job result, which is a lot more descriptive then before. Also, attempts to start device units in containers will now immediately fail instead of causing jobs to be enqueued that never go away.
2014-12-15networkd: failing to track links is a serious problem so log at warning ↵Tom Gundersen
level rather than debug
2014-12-15shared: time-dst: Avoid buffer overflowMartin Pitt
Commit 681f9718 introduced an additional null terminator for the zone names. Increase the allocation of "transitions" to actually make room for this.
2014-12-14blkid: Warn when rejecting a superblock with a bad csumGabriel de Perthuis
Bump libblkid requirement from 2.20 to 2.24. util-linux 2.25 is actually required since fdbbad981cc5da8bb4ed7e9b6646e7a114745ec5
2014-12-14delta: fix output alignment of [REDIRECTED] entriesIvan Shapovalov