summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* sd-lldp: minor header cleanupTom Gundersen2014-12-19
| | | | | | | | | | | * (potentially) public headers must reside in src/systemd/ (not in src/libsystemd*) * some private (not prefixed with sd_) functions moved from sd-lldp.h to lldp-internal.h * introduce lldp-util.h for the cleanup macro, as these should not be public * rename the cleanup macro, we always name them _cleanup_foo_, never _cleanup_sd_foo_ * mark some function arguments as 'const'
* machined: add a full bus object for imagesLennart Poettering2014-12-19
|
* machined: add new GetImage() bus call for retrieving the bus path for an imageLennart Poettering2014-12-19
|
* sysv-generator: properly add Makefile symlinkLennart Poettering2014-12-19
|
* util: rename ignore_file() to hidden_file()Lennart Poettering2014-12-19
| | | | | hidden_file() is a bit more precise, since dot files usually shouldn't be ignored, but certainly be considered hidden.
* machinectl: port machinectl to new verbs logicLennart Poettering2014-12-19
|
* import: Verb[] array can be static, tooLennart Poettering2014-12-19
|
* verbs: when invoking the default verb, pass a faked argv array, with just ↵Lennart Poettering2014-12-19
| | | | | | the verb in it That way the dispatcher calls know how they got called.
* machined/machinectl: add logic to show list of available imagesLennart Poettering2014-12-19
| | | | | | | | | This adds a new bus call to machined that enumerates /var/lib/container and returns all trees stored in it, distuingishing three types: - GPT disk images, which are files suffixed with ".gpt" - directory trees - btrfs subvolumes
* util: when creating temporary filename for atomic creation of files, add an ↵Lennart Poettering2014-12-19
| | | | | | | extra "#" to the name That way, we have a simple, somewhat reliable way to detect such temporary files, by simply checking if they start with ".#".
* journal: skipping of exhausted journal files is bad if direction changedMichal Schmidt2014-12-19
| | | | | | | | | EOF is meaningless if the direction of iteration changes. Move the EOF optimization under the direction check. This fixes test-journal-interleaving for me. Thanks to Filipe Brandenburger for telling me about the failure.
* journal: make next_with_matches() always use f->current_offsetMichal Schmidt2014-12-19
| | | | | | | | | | | | | | | | | | | | | | | next_with_matches() is odd in that its "unit64_t *offset" parameter is both input and output. In other it's purely for output. The function is called from two places in next_beyond_location(). In both of them "&cp" is used as the argument and in both cases cp is guaranteed to equal f->current_offset. Let's just have next_with_matches() ignore "*offset" on input and operate with f->current_offset. I did not investigate why it is, but it makes my usual benchmark run reproducibly faster: $ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null real 0m4.032s user 0m3.896s sys 0m0.135s (Compare to preceding commit, where real was 4.4s.)
* journal: fix skipping of duplicate entries in iterationMichal Schmidt2014-12-19
| | | | | | | | | | | | | | | | | | | | | | | I accidentally broke the detection of duplicate entries in 7943f42275 "journal: optimize iteration by returning previously found candidate entry". When we have a known location of a candidate entry, we must not return from next_beyond_location() immediately. We must go through the duplicates detection to make sure the candidate differs from the already iterated entry. This fix slows down iteration a bit, but it's still faster than it was before the rework. $ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null real 0m4.448s user 0m4.298s sys 0m0.149s (Compare with results from commit 7943f42275, where real was 5.3s before the rework.)
* networkd: link - plug leakTom Gundersen2014-12-19
|
* networkctl: lldp - respect arg_legendTom Gundersen2014-12-19
|
* LLDP: Add support for networkctlSusant Sahani2014-12-19
|
* networkd: integrate LLDPSusant Sahani2014-12-19
| | | | | | | | | | | | | This patch integrates LLDP with networkd. Example conf: file : lldp.network [Match] Name=em1 [Network] LLDP=yes
* networkd: Introduce Link Layer Discovery Protocol (LLDP)Susant Sahani2014-12-19
| | | | | | | | | | | | | | This patch introduces LLDP support to networkd. it implements the receiver side of the protocol. The Link Layer Discovery Protocol (LLDP) is an industry-standard, vendor-neutral method to allow networked devices to advertise capabilities, identity, and other information onto a LAN. The Layer 2 protocol, detailed in IEEE 802.1AB-2005.LLDP allows network devices that operate at the lower layers of a protocol stack (such as Layer 2 bridges and switches) to learn some of the capabilities and characteristics of LAN devices available to higher layer protocols.
* networkctl: port to verbs helperTom Gundersen2014-12-19
|
* systemd-hwdb: port to new verbs helperTom Gundersen2014-12-19
|
* import: dck - fix curl error handlingTom Gundersen2014-12-19
|
* import: add new minimal tool "systemd-import" for pulling down foreign ↵Lennart Poettering2014-12-19
| | | | | | | | | | | | | | | | | containers and install them locally This adds a simply but powerful tool for downloading container images from the most popular container solution used today. Use it like this: # systemd-import pull-dck mattdm/fedora # systemd-nspawn -M fedora This will donwload the layers for "mattdm/fedora", and make them available locally as /var/lib/container/fedora. The tool is pretty complete, as long as it's only about pulling down images, or updating them. Pushing or searching is not supported yet.
* util: add generalization of verb parsing for command line toolsLennart Poettering2014-12-19
| | | | | We should move loginctl, timedatectl, machinectl over to use this new API instead of a manual one.
* util: make sure rm_rf() can be called on symlinks (with the effect of ↵Lennart Poettering2014-12-19
| | | | deleting it)
* strv: ass new strv_is_uniq() and strv_reverse() callsLennart Poettering2014-12-19
|
* execute: the runtime directory can only be on tmpfs, hence don't use ↵Lennart Poettering2014-12-19
| | | | rm_rf_dangerous() needlessly
* nss-myhostname: introduce is_gateway() similar to the existing is_hostname()Lennart Poettering2014-12-19
|
* load-fragment: allow quoting in command name and document allowed escapesZbigniew Jędrzejewski-Szmek2014-12-18
| | | | | | | | | The handling of the command name and other arguments is unified. This simplifies things and should make them more predictable for users. Incidentally, this makes ExecStart handling match the .desktop file specification, apart for the requirment for an absolute path. https://bugs.freedesktop.org/show_bug.cgi?id=86171
* Treat a trailing backslash as an errorZbigniew Jędrzejewski-Szmek2014-12-18
| | | | | | | | | | | | | | | | | | Commit a2a5291b3f5 changed the parser to reject unfinished quoted strings. Unfortunately it introduced an error where a trailing backslash would case an infinite loop. Of course this must fixed, but the question is what to to instead. Allowing trailing backslashes and treating them as normal characters would be one option, but this seems suboptimal. First, there would be inconsistency between handling of quoting and of backslashes. Second, a trailing backslash is most likely an error, at it seems better to point it out to the user than to try to continue. Updated rules: ExecStart=/bin/echo \\ → OK, prints a backslash ExecStart=/bin/echo \ → error ExecStart=/bin/echo "x → error ExecStart=/bin/echo "x"y → error
* test-strv: use STRV_MAKEZbigniew Jędrzejewski-Szmek2014-12-18
|
* tree-wide: make condition_free_list return NULLZbigniew Jędrzejewski-Szmek2014-12-18
|
* core: make exec_command_free_list return NULLZbigniew Jędrzejewski-Szmek2014-12-18
|
* test-cap-list: allow mismatch in caseZbigniew Jędrzejewski-Szmek2014-12-18
|
* path-util: fix breakage in path_is_mount_pointDave Reisner2014-12-18
| | | | | | | | | | | | | This fixes 2 problems introduced by 6feeeab0bc: 1) If name_to_handle_at returns ENOSYS for the child, we'll wrongly return -ENOSYS when it returns the same for the parent. Immediately jump to the fallback logic when we get ENOSYS. 2) If name_to_handle_at returns EOPNOTSUPP for the child but suceeds for the parent, we'll be comparing an uninitialized value (mount_id) to an initialized value (mount_id_parent). Initialize the mount_id variables to invalid mount_ids to avoid this.
* systemd-hwdb: introduce new toolTom Gundersen2014-12-18
| | | | | | | | 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.
* networkd: add FDB supportAlin Rauta2014-12-18
|
* journal: next_with_matches() now does not need a mapped object as inputMichal Schmidt2014-12-18
| | | | | Now that journal_file_next_entry() does not need a pointer to the current object, next_with_matches() does not need it either.
* journal: journal_file_next_entry() does not need pointer to current ObjectMichal Schmidt2014-12-18
| | | | The current offset is sufficient information.
* journal: optimize iteration by returning previously found candidate entryMichal Schmidt2014-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* journal: optimize iteration by skipping exhausted filesMichal Schmidt2014-12-18
| | | | | | | | | | | 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.
* journal: drop unnecessary parameters of next_beyond_location()Michal Schmidt2014-12-18
| | | | | 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.
* journal: remove redundant variable new_offsetMichal Schmidt2014-12-18
| | | | | The file's current_offset is already updated at this point, so let's use it.
* journal: compare candidate entries using JournalFiles' locationsMichal Schmidt2014-12-18
| | | | | When comparing the locations of candidate entries, we can rely on the location information stored in struct JournalFile.
* journal: simplify set_location()Michal Schmidt2014-12-18
| | | | | | | | | | 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.
* journal: keep per-JournalFile location info during iterationMichal Schmidt2014-12-18
| | | | | | | | | | | | | | | 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).
* journal: abstract the resetting of JournalFile's locationMichal Schmidt2014-12-18
|
* journal: move definition of LocationType to journal-file.hMichal Schmidt2014-12-18
| | | | | In preparation for individual JournalFiles maintaining a location of their own.
* Revert "journal: optimize iteration: skip whole files behind current location"Michal Schmidt2014-12-18
| | | | | | This reverts commit b7c88ab8cc7d55a43450bf3dea750f95f2e910d6. This optimization will be made redundant by the following patches.
* Revert "journal: optimize iteration: skip files that cannot improve current ↵Michal Schmidt2014-12-18
| | | | | | | | candidate entry" This reverts commit f8b5a3b75fb55f0acb85c21424b3893c822742e9. This optimization will be made redundant by the following patches.
* journal: delete unused function journal_file_skip_entry()Michal Schmidt2014-12-18
| | | | Its only caller is a test.